I;m brand new at JCL programming and am supposed to come up with code that is to create a partitioned data set copied from a previously existing one. I've searched all over the 'net for an answer but no luck. Hopefully some nice people here can steer me in the right direction. Anyway, when i submit the following:
000001 //NEWDATA JOB 1,NAME,MSGCLASS=X
000002 //NEW EXEC PGM=IEFBR14
000003 //CREATE DD DSN=USERID.JCL.LIB,DISP=(NEW,CATLG),
000004 // UNIT=SYSALLDA,SPACE=(TRK,1)
000005 //COPYOLD EXEC PGM=IEBCOPY
000006 //SYSPRINT DD SYSOUT=*
000007 //SYSUT1 DD DSN=USERID.JCL,DISP=SHR
000008 //SYSUT2 DD DSN=USERID.JCL.LIB,DISP=OLD,
000009 // SPACE=(CYL,(1,1,45)),
000010 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
000011 // UNIT=SYSALLDA,
000012 // VOL=SER=MARF1B
000013 //SYSIN DD *
000014 COPY INDD=SYSUT1,OUTDD=SYSUT2
000015 /*
000002 //NEW EXEC PGM=IEFBR14
000003 //CREATE DD DSN=USERID.JCL.LIB,DISP=(NEW,CATLG),
000004 // UNIT=SYSALLDA,SPACE=(TRK,1)
000005 //COPYOLD EXEC PGM=IEBCOPY
000006 //SYSPRINT DD SYSOUT=*
000007 //SYSUT1 DD DSN=USERID.JCL,DISP=SHR
000008 //SYSUT2 DD DSN=USERID.JCL.LIB,DISP=OLD,
000009 // SPACE=(CYL,(1,1,45)),
000010 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
000011 // UNIT=SYSALLDA,
000012 // VOL=SER=MARF1B
000013 //SYSIN DD *
000014 COPY INDD=SYSUT1,OUTDD=SYSUT2
000015 /*
it wil run and i get an RC of 0, and the new data set is created but when i try to browse it or otherwise go in and view it i get a message that says 'Invalid record format'. Then when i remove the RECFM=FB which i believe means fixed block it still will create it but i then get 'Invalid record length'. I don't see what the problem is because i assumed it was simply copying all of that information from the old data set which i can navigate just fine.
Can anyone spot the problem? Sorry if the question is beyond stupid. Thanks in advance.