JCL work series - how to manipulate PDSes?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

JCL work series - how to manipulate PDSes?

Postby midix » Sun Nov 04, 2007 10:44 pm

Hi,
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))
//

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
//


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)
//

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.
//


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.
midix
 
Posts: 1
Joined: Sun Nov 04, 2007 10:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JCL work series - how to manipulate PDSes?

Postby CICS Guy » Sun Nov 04, 2007 11:48 pm

For starters, if the PDS exists (and is cataloged), omit the DCB, UNIT & VOL info, it is not needed and if not provided, will not conflict....
JCL Reference
JCL User's Guide
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: JCL work series - how to manipulate PDSes?

Postby dick scherrer » Tue Nov 06, 2007 4:08 am

Hello,

Your block size should be a multiple of lrecl.

Change your jcl and try again.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post