Generate GDG FILE and read all record included in it



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

Generate GDG FILE and read all record included in it

Postby jeugenio » Tue Jan 11, 2011 9:29 pm

Could you help to me

I am doing and JCL to make a GDG FILE and i don´t know if it is correct

//SORT01 EXEC PGM=SORT,COND=(0,NE)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=ORC7.D7.LR.BDK.D7REBRK.COPIA2.SORTOUT,DISP=SHR
//SORTOUT DD DSN=OCI.K3.LR.BDK.K3MP0008.SORT01(+1),
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(50,100),RLSE),
// DCB=(RECFM=FB,LRECL=2300,BLKSIZE=0,DSORG=PS)

and after that i want that all record included in this file pass to other file.

//K3CCA7E1 DD DSN=OCI.K3.LR.BDK.K3MP0008.SORT01,DISP=SHR
//K3CCA7S1 DD DSN=OCI.K3.LR.BDK.K3MP0008.K3CCA7.K3CCA7S1,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(100,50),RLSE),
// DCB=(LRECL=420,RECFM=FB,BLKSIZE=0,DSORG=PS)

Is it is correct?
jeugenio
 
Posts: 6
Joined: Mon Dec 13, 2010 10:50 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Generate GDG FILE and read all record included in it

 

Re: Generate GDG FILE and read all record included in it

Postby steve-myers » Tue Jan 11, 2011 10:16 pm

As written, the K3CCA7E1 DD statement specifies what we call a GDG ALL situation. In this situation, all the generations of OCI.K3.LR.BDK.K3MP0008.SORT01 are allocated, with the most recently defined generation, through to the oldest generation, basically in reverse order. You probably want to specify DSN=OCI.K3.LR.BDK.K3MP0008.SORT01(0) to use just the most recently defined generation.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Generate GDG FILE and read all record included in it

Postby Robert Sample » Tue Jan 11, 2011 10:17 pm

I am doing and JCL to make a GDG FILE and i don´t know if it is correct
Why not? Running the JCL will either result in a new generation of the GDG being cataloged, or it won't. This does not require a rocket scientist to test -- merely someone capable of typing "submit" in TSO, and then look at the output of the job once it has executed.

As long as you are not requiring the GDG data to be sorted in a particular sequence, you can access all generations of the GDG by referencing the GDG base without a generation number. The generations are accessed from most recently created to oldest created (-0 first, -1 second, -2 third, and so forth until the last cataloged generation).
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: Generate GDG FILE and read all record included in it

Postby dick scherrer » Wed Jan 12, 2011 1:11 am

Hello,

Just a comment that the lrecl is different for the files beng created. . . .

May be just fine, but may not - depending.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post