How to write next record in VSAM using Information expert
Moderators: dbzTHEdinosauer, Moderator Group
How to write next record in VSAM using Information expert
HI
I am facing a problem, i have declared a Vsam(ksds), in a Information expert program.I want to write a record , its doin that but when the program is used for different sources ,its over writes the previous record of another source instead of adding a next record.
Can anyone please tell me what to do to solve this problem?
Thanks Anu
I am facing a problem, i have declared a Vsam(ksds), in a Information expert program.I want to write a record , its doin that but when the program is used for different sources ,its over writes the previous record of another source instead of adding a next record.
Can anyone please tell me what to do to solve this problem?
Thanks Anu
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Hi Anu,
'am still not clear with what is happening at your end, however please have a look at this maual, hopefully it'll help you.
When you say this
'am still not clear with what is happening at your end, however please have a look at this maual, hopefully it'll help you.
When you say this
Does that mean that your program can get input from multiple sources and using all those inputs you want to write records only in a single VSAM ? If yes, then actually that does not provide me anything to answer your original question - you've got a single source program some input & one VSAM output but when you write second record in VSAM it does not work, is this your question ?It means that we are using the same program for various soucres like, we get data from diffrent feeds(input).
Regards,
Anuj
Anuj
Hi Anuj
Yes this is my question.Whenver i try to run the program for any other input, it simply overwrite the previous record instead of adding a new one.
This program has other outputs also which are working fine.
At a time i use this program for one source only.
I tried to use a sequential file instead of VSAM file, then it worked fine, but i need a VSAM file..
Hope this makes my point a bit clear.
Thanks
Anu
Yes this is my question.Whenver i try to run the program for any other input, it simply overwrite the previous record instead of adding a new one.
This program has other outputs also which are working fine.
At a time i use this program for one source only.
I tried to use a sequential file instead of VSAM file, then it worked fine, but i need a VSAM file..
Hope this makes my point a bit clear.
Thanks
Anu
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Hi
Code for VSAM DEF:
//SYSIN DD *
DELETE FST.TST3.ALL.REPORT.CLUSTER CLUSTER PURGE
SET MAXCC EQ 0
DEFINE CLUSTER -
(NAME(FST.TST3.ALL.REPORT.CLUSTER) -
TRACKS(50 50) -
MODEL(FST.TST3.TP.BRD.CLUSTER) -
IMBED -
IXD -
REUSE -
RECSZ (80 80) -
KEYS (10 0) -
) -
DATA -
(NAME(FST.TST3.ALL.REPORT.DATA) -
CISZ(18432)) -
INDEX -
(NAME(FST.TST3.ALL.REPORT.INDEX))
Program code:this is an Information expert code not cobol,
ATTACH FSTOTRPT CREATE
FSTOTRPT:FSTFMT-APPLN = FSTFMT-APPLN
FSTOTRPT:FSTFMT-JRNL-DATA-TYP = FSTFMT-JRNL-DATA-TYP
FSTOTRPT:FSTFMT-SRCE = FSTFMT-SRCE
FSTOTRPT:FSTFMT-JRNL-ID = FSTFMT-JRNL-ID
FSTOTRPT:FSTFMT-PRD = FHDER-FSTFMT-PRD
FSTOTRPT:FSTFMT-WEEK = FHDER-FSTFMT-WEEK
FSTOTRPT:FSTFMT-DY = FHDER-FSTFMT-DY
FSTOTRPT:FSTTOT-COUNT = ACCT-TOTAL-IN
FSTOTRPT:FSTTOT-SUSCOUNT = ACCT-TOTAL-SUS
WRITE FSTTOT-TRANS-REC
this is a Vsam record.
Thanks
Anu
Code for VSAM DEF:
//SYSIN DD *
DELETE FST.TST3.ALL.REPORT.CLUSTER CLUSTER PURGE
SET MAXCC EQ 0
DEFINE CLUSTER -
(NAME(FST.TST3.ALL.REPORT.CLUSTER) -
TRACKS(50 50) -
MODEL(FST.TST3.TP.BRD.CLUSTER) -
IMBED -
IXD -
REUSE -
RECSZ (80 80) -
KEYS (10 0) -
) -
DATA -
(NAME(FST.TST3.ALL.REPORT.DATA) -
CISZ(18432)) -
INDEX -
(NAME(FST.TST3.ALL.REPORT.INDEX))
Program code:this is an Information expert code not cobol,
ATTACH FSTOTRPT CREATE
FSTOTRPT:FSTFMT-APPLN = FSTFMT-APPLN
FSTOTRPT:FSTFMT-JRNL-DATA-TYP = FSTFMT-JRNL-DATA-TYP
FSTOTRPT:FSTFMT-SRCE = FSTFMT-SRCE
FSTOTRPT:FSTFMT-JRNL-ID = FSTFMT-JRNL-ID
FSTOTRPT:FSTFMT-PRD = FHDER-FSTFMT-PRD
FSTOTRPT:FSTFMT-WEEK = FHDER-FSTFMT-WEEK
FSTOTRPT:FSTFMT-DY = FHDER-FSTFMT-DY
FSTOTRPT:FSTTOT-COUNT = ACCT-TOTAL-IN
FSTOTRPT:FSTTOT-SUSCOUNT = ACCT-TOTAL-SUS
WRITE FSTTOT-TRANS-REC
this is a Vsam record.
Thanks
Anu
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Hi,
You bowled me out - I don't know coding in Information expert but basic idea should be similar to COBOL, you might try your luck in google:
http://www.google.co.in/search?hl=en&q= ... VSAM&meta=
You bowled me out - I don't know coding in Information expert but basic idea should be similar to COBOL, you might try your luck in google:
http://www.google.co.in/search?hl=en&q= ... VSAM&meta=
Regards,
Anuj
Anuj
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page