Page 1 of 3

Flat file to VSAM

PostPosted: Fri Oct 15, 2010 3:33 pm
by shiv77
Hi All

I am using the following jcl to copy the flat file to vsam

//RUNJCLAT JOB  'IBMMFS','SHIV',CLASS=G,MSGCLASS=X,MSGLEVEL=(1,1),
//           NOTIFY=&SYSUID
//STEP1   EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//DATAIN DD DISP=OLD,DSN=PWSX.R9SSHC6.FLAT1
//SYSIN DD *
  DEFINE CLUSTER (NAME (R9SSHC6.DATA.VSAM5)
  VOLUMES(WORK02) CYLINDERS(1 2)
  RECORDSIZE (31 60) KEYS(11 4) INDEXED)
  REPRO INFILE(DATAIN) OUTDATASET(R9SSHC6.DATA.VSAM5) ELIMIT (200)
//
/*


the DATA and INDEX file is created and I am getting maxcc=8 with following error
IDCAMS  SYSTEM SERVICES                                           T

  DEFINE CLUSTER (NAME (R9SSHC6.DATA.VSAM6)
  VOLUMES(WORK02) CYLINDERS(1 2)
  RECORDSIZE (31 60) KEYS(11 4) INDEXED)
IDC0508I DATA ALLOCATION STATUS FOR VOLUME WORK02 IS 0
IDC0509I INDEX ALLOCATION STATUS FOR VOLUME WORK02 IS 0
IDC0512I NAME GENERATED-(D) R9SSHC6.DATA.VSAM6.DATA
IDC0512I NAME GENERATED-(I) R9SSHC6.DATA.VSAM6.INDEX
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

  REPRO INFILE(DATAIN) OUTDATASET(R9SSHC6.DATA.VSAM6) ELIMIT (200)
IDC3302I  ACTION ERROR ON R9SSHC6.DATA.VSAM6
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000  D2C1D2C8 C1D5F3F3 F3F3C4

Re: Flat file to VSAM

PostPosted: Fri Oct 15, 2010 3:34 pm
by enrico-sorichetti
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:


and...
it should be enough to review the VSAM basics to understand

Re: Flat file to VSAM

PostPosted: Fri Oct 15, 2010 3:35 pm
by shiv77
shiv77 wrote:Hi All

I am using the following jcl to copy the flat file to vsam

//RUNJCLAT JOB  'IBMMFS','SHIV',CLASS=G,MSGCLASS=X,MSGLEVEL=(1,1),
//           NOTIFY=&SYSUID
//STEP1   EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//DATAIN DD DISP=OLD,DSN=PWSX.R9derh4.FLAT1
//SYSIN DD *
  DEFINE CLUSTER (NAME (R9derh4.DATA.VSAM5)
  VOLUMES(WORK02) CYLINDERS(1 2)
  RECORDSIZE (31 60) KEYS(11 4) INDEXED)
  REPRO INFILE(DATAIN) OUTDATASET(R9derh4.DATA.VSAM5) ELIMIT (200)
//
/*


the DATA and INDEX file is created and I am getting maxcc=8 with following error
IDCAMS  SYSTEM SERVICES                                           T

  DEFINE CLUSTER (NAME (R9derh4.DATA.VSAM6)
  VOLUMES(WORK02) CYLINDERS(1 2)
  RECORDSIZE (31 60) KEYS(11 4) INDEXED)
IDC0508I DATA ALLOCATION STATUS FOR VOLUME WORK02 IS 0
IDC0509I INDEX ALLOCATION STATUS FOR VOLUME WORK02 IS 0
IDC0512I NAME GENERATED-(D) R9derh4.DATA.VSAM6.DATA
IDC0512I NAME GENERATED-(I) R9derh4.DATA.VSAM6.INDEX
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

  REPRO INFILE(DATAIN) OUTDATASET(R9derh4.DATA.VSAM6) ELIMIT (200)
IDC3302I  ACTION ERROR ON R9derh4.DATA.VSAM6
IDC3314I **RECORD OUT OF SEQUENCE - KEY FOLLOWS:
000000  D2C1D2C8 C1D5F3F3 F3F3C4

Re: Flat file to VSAM

PostPosted: Fri Oct 15, 2010 3:45 pm
by shiv77
can you please provide link to the basic vsam manual oyu are referring to.

Re: Flat file to VSAM

PostPosted: Fri Oct 15, 2010 4:02 pm
by enrico-sorichetti
double posting the same stuff is just a waste of resources for everybody!
what is that You did not understand in the whole message sequence and
specifically in the message I highlighted in my first reply

for ALL the IBM manuals You will need in Your IT career start from here
http://www-03.ibm.com/systems/z/os/zos/ ... index.html

for a quick and dirty explanation You might use the lookAt option

Re: Flat file to VSAM

PostPosted: Sat Oct 16, 2010 1:04 am
by dick scherrer
Hello and welcome to the forum,

Have you found the vsam documentation?

You do now understand that the data to be loaded must already be in sequence by the vsam key. . .

In addition to "the manuals" i suggest you find a redbook called "vsam demystified". It will be one of the first "hits" in a web search. It is quite large, but if you are going to do much work with vsam, it is excellent.

Re: Flat file to VSAM

PostPosted: Mon Oct 18, 2010 4:44 pm
by shiv77
Hey Dick , I found the red book "VSAM demystefied", it looks Great! Thanks.

Re: Flat file to VSAM

PostPosted: Mon Oct 18, 2010 5:14 pm
by shiv77
Hi Enrico, This is Ankoo typing from Shiv 's PC, hey please provide me, IBM Manuals, if I would had a single idea that this would happen, I would not have posted my questions, at least give me a chance to improve my self,coz every time I google my question the first link is the ibmmainframe forum link!! Now I have relized my mistake ,so please provide me access..

Thanks and Regards
Ankoo

Re: Flat file to VSAM

PostPosted: Mon Oct 18, 2010 5:32 pm
by enrico-sorichetti
Ankoo, the link was already posted in my first reply in this topic
for ALL the IBM manuals You will need in Your IT career start from here
http://www-03.ibm.com/systems/z/os/zos/ ... index.html

IBM manuals are available to anybody just by clicking

and by the way..."hey" is an uneducated way of addressing people :D

Re: Flat file to VSAM

PostPosted: Mon Oct 18, 2010 5:35 pm
by enrico-sorichetti
c /first reply/one of my previous replies/