IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Specify 365 GDG Generations input tape file to output tapes


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RanjitRaveendran
Warnings : 1

New User


Joined: 24 Nov 2008
Posts: 20
Location: Bangalore

PostPosted: Tue Mar 03, 2009 12:55 pm
Reply with quote

I need to specify 365 generations of a GDG Tape file as input and output to 365 generations of GDG tape file. The retention period of the output tapes should start from 1 till 365 days too.

The scenario is like;

//PLIPGM EXEC PGM=PLIPGM,REGION=4M
//PLIDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//IHSS0011 DD DSN=GDG.BASE.A01.G3911V00,DISP=SHR,
// UNIT=T3480
//OHSS0011 DD DSN=GDG.BASE.A01.G0001V00,
// DISP=(,CATLG),
// UNIT=T3480,VOL=(,RETAIN),RETPD=1,
// RECFM=VB,LRECL=4096,BLKSIZE=32760

I need to run this job for 365 generations of the GDG.BASE.A01 starting from G3911V00 (i have the name list of the 365 generations) and output to GDG.BASE.A01 to 365 generations starting from G0001V00, the retention period of the output GDG to vary from 1 (for G0001V00) to 365 days for the 365th GDG generation.

Is there an easy way to do this in one job? Would i have to submit seperate jobs for the 365 GDG generations? The PGM PLIPGM does some processing on the file and write to the output tape GDG files. Hope i have given enough information to describe my problem.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Mar 03, 2009 1:09 pm
Reply with quote

I would love to know how you managed to get a base GDG with 365 generations defined.

You can use (+1) as the output to automatically increment the generation number.

And it looks like one step / job per generation to keep everything in sync.
Back to top
View user's profile Send private message
RanjitRaveendran
Warnings : 1

New User


Joined: 24 Nov 2008
Posts: 20
Location: Bangalore

PostPosted: Tue Mar 03, 2009 1:18 pm
Reply with quote

Thank you for the reply.
GDG.BASE.A01.G3911V00 123342 03/03/2008
.
.
.
GDG.BASE.A01.G4276V00 101133 03/02/2009

Here are the upper and lower limits.

Is there an option where i can use a loop (IF THEN ELSE or something like that) to increment (+1) the input file as well as output file once each generation is processed so that i can execute the whole 365 generations in one go?

Could you please let me know if IEHPROGM can be used as a step in the job to SCRATCH the input GDG once the output generation is successfully prepared?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Mar 03, 2009 2:07 pm
Reply with quote

Hi,

I don't think there are 366 generations defined, either some are not part of the GDG base (rolled off or deferred) or there are some gaps between the upper and lower limits.

Do a listcat next to the gdg base to see what the limit is set to.

As you have the list of the datasets, I woulld generate a job for each dataset and do as Expat suggested.

You can use IEHPROGMm but you only need to use UNCATLG DSNAME=

As for returning the old tapes to the scratch, you will need to update the TMS system depending on how the tapes are managed, ie.under CATALOG control, EXPIRY date or CYCLIC.


Gerry
Back to top
View user's profile Send private message
RanjitRaveendran
Warnings : 1

New User


Joined: 24 Nov 2008
Posts: 20
Location: Bangalore

PostPosted: Tue Mar 03, 2009 8:38 pm
Reply with quote

//SCRTCH EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=A
//DD1 DD UNIT=T3480,VOLUME=SER=100829,DISP=SHR
//SYSIN DD *
SCRATCH DSNAME=Z892806.T2D.HCC010.DSHLOG.A01.CC0309,
VOL=T3480=100829
UNCATLG DSNAME=Z892806.T2D.HCC010.DSHLOG.A01.CC0309
/*

If i specify the above SYSIN, i get an error like below but the Tape Dataset is scratched/uncataloged.

SYSTEM SUPPORT UTILITIES ---- IEHPROGM

SCRATCH DSNAME=Z892806.T2D.HCC010.DSHLOG.A01.CC0309,
IEH202I INVALID KEYWORD OR CONTROL STATEMENT SYNTAX

VOL=T3480=100829
IEH201I INVALID REQUEST... STATEMENT IGNORED

UNCATLG DSNAME=Z892806.T2D.HCC010.DSHLOG.A01.CC0309
NORMAL END OF TASK RETURNED FROM UNCATLG

UTILITY END
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Mar 03, 2009 8:52 pm
Reply with quote

IEHPROGM - SCRATCH usually means that you wish to delete the VTOC entry. As this is a tape, there is no VTOC entry, hence the error.

Why are you using IEHPROGM and not IDCAMS ?
Back to top
View user's profile Send private message
RanjitRaveendran
Warnings : 1

New User


Joined: 24 Nov 2008
Posts: 20
Location: Bangalore

PostPosted: Tue Mar 03, 2009 9:25 pm
Reply with quote

I am sorry, i am pretty new to JCL. Could you please provide me the format using my example.
Back to top
View user's profile Send private message
RanjitRaveendran
Warnings : 1

New User


Joined: 24 Nov 2008
Posts: 20
Location: Bangalore

PostPosted: Tue Mar 03, 2009 9:52 pm
Reply with quote

I tried the below code, i am getting an abend ' SCRTCH - ABEND=S413 U0000 REASON=00000004 567'

//SCRTCH EXEC PGM=IKJEFT01
//STEPLIB DD DSN=Z892806.T2D.HCC010.DSHLOG.A01.CC0309,DISP=SHR,
// UNIT=T3480,VOLUME=SER=100861
//SYSTSPRT DD SYSOUT=A
//SYSTSIN DD *
SCRATCH 'Z892806.T2D.HCC010.DSHLOG.A01.CC0309'
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Mar 04, 2009 3:38 am
Reply with quote

Hi,

why are you specifying the dataset you are trying to UNCATLG as your STEPLIB.

Quote:
The STEPLIB DD statement is used to identify a program library to
search first when attempting to locate programs executed during the
job step. The STEPLIB can be placed anywhere in the step's JCL.


Again use UNCATLG and not scratch for tape files.

If you want to use IDCAMS, you can try this

Code:
//STEP0001 EXEC PGM=IDCAMS             
//SYSPRINT DD SYSOUT=*                 
//SYSIN    DD *                       
  DELETE dataset-name  SCRATCH 
/*


Also you mentioned GDG a lot, but none of the examples you have provided seem to deal with GDG files.


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 04, 2009 3:56 am
Reply with quote

Hello,

A word of caution. . . .

If you have adequate security permissions, you could basically destroy that system. . .

Suggest that until you become much more familiar with the utilities and the system in general, you discontinue flailing around deleting "things". What do the deletes/scratch/uncatlg have to do with the original question about gdgs?

For practice, i suggest you create some new test datasets and practice everything you need to do with these test datasets.

Also, once you get to where you would attempt to delete "real" datasets, you would be safer making sure you had a backup of these files (dfdss could be used to create a backup).

There is nothing wrong with being new - we all were at some point. There is something wrong with your organization's approach to system support, it appears.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top