I am a student. I have googled a lot for JCL examples and tutorials but I cannot find something complete. Those code portions I found just do not stick together, although work fine alone.
I am using Hercules emulator.
So what I need is:
-create simple PDS
-create a member in that PDS
-print out the contents of that member
-copy the contents of that member to some other new member
-change the contents of the member
-delete the member
-delete my PDS.
What I got now is following:
I can create PDS, but it seems I have messed up all those SPACE and DCB things. Because PDS is created OK, but when I try to add a member, I get "CONFLICTING DCB PARAMETERS" and similar errors.
I have really poor understanding about those SPACE things - there are many info about TRK and CYL and sizes but no good explanation with example - how to create a simple PDS for 10 records each about 80 bytes?
The code I use is:
For deleting PDS:
//MYDEL JOB MSGLEVEL=(1,1)
//A EXEC PGM=IEFBR14
//S DD DSN=MYPDS.TST,DISP=(MOD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(0))
//
//A EXEC PGM=IEFBR14
//S DD DSN=MYPDS.TST,DISP=(MOD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(0))
//
It seems working fine.
For printing record:
//MYPRINT JOB MSGLEVEL=(1,1)
//TEST EXEC PGM=IEBGENER
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=A
//SYSUT1 DD DSN=MYPDS.TST(MYREC),DISP=SHR
//
//TEST EXEC PGM=IEBGENER
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=A
//SYSUT1 DD DSN=MYPDS.TST(MYREC),DISP=SHR
//
It should work if I could add a record into my PDS.
Now the problematic ones:
creating PDS:
//MYCRPDS JOB MSGLEVEL=(1,1)
//A EXEC PGM=IEFBR14
//S DD DSN=MYPDS.TST,DISP=(NEW,CATLG),UNIT=SYSDA,SPACE=(80,(80,,10)),
// VOL=SER=MVTRES,DCB=(RECFM=FB,LRECL=80,BLKSIZE=1000,DSORG=PO)
//
//A EXEC PGM=IEFBR14
//S DD DSN=MYPDS.TST,DISP=(NEW,CATLG),UNIT=SYSDA,SPACE=(80,(80,,10)),
// VOL=SER=MVTRES,DCB=(RECFM=FB,LRECL=80,BLKSIZE=1000,DSORG=PO)
//
When I print out the contents by using IEHLIST, i see taht my PDS has 10 directory blocks and 9 unused. I hope that is enough for my needs?
And the biggest problem:
//MYADDREC JOB MSGLEVEL=(1,1)
//A EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=A
//SYSUT2 DD DISP=OLD,DSN=MYPDS.TST(MYREC),UNIT=SYSDA,
// VOL=SER=MVTRES,DCB=(RECFM=FB,LRECL=80,BLKSIZE=100,DSORG=PO)
//SYSUT1 DD *
Some text for storing in a record.
//
//A EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=A
//SYSUT2 DD DISP=OLD,DSN=MYPDS.TST(MYREC),UNIT=SYSDA,
// VOL=SER=MVTRES,DCB=(RECFM=FB,LRECL=80,BLKSIZE=100,DSORG=PO)
//SYSUT1 DD *
Some text for storing in a record.
//
And this gives me "CONFLICTING DCB PARAMETERS"
Could you suggest a good solution or tell me where can I read more about SPACE and DCB for PDS without using CYL and TRK ?
Thanks.