Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Specify 365 GDG Generations input tape file to output tapes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Specify 365 GDG Generations input tape file to output tapes
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: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 03, 2009 1:09 pm    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Tue Mar 03, 2009 2:07 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 03, 2009 8:52 pm    Post subject:
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    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Wed Mar 04, 2009 3:38 am    Post subject:
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

Site Director


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

PostPosted: Wed Mar 04, 2009 3:56 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us