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

Need to execute a step more than once.


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

New User


Joined: 05 Feb 2008
Posts: 24
Location: Coimbatore

PostPosted: Wed Apr 23, 2008 10:16 am
Reply with quote

Hi,

i have a case in which i want to execute a step in a jcl more than once.
i.e.) i have 5 input files and i need to create 5 output files corressponding to each input files using the same easytrieve program.

Here's the jcl step:

//P020 EXEC PGM=EZTPA00,REGION=4M,TIME=(15,00),COND=(0,NE)
//*
//EZTVFM DD UNIT=SYSDA,SPACE=(CYL,(100,20),RLSE)
//*
//FILEIN DD DSN=INPUT.FILE.1,DISP=SHR
//*
//FILEOUT DD DSN=OUTPUT.FILE.1,
// DISP=(,CATLG,DELETE),
// UNIT=DISK,SPACE=(CYL,(10,20),RLSE),
// DCB=(LRECL=122,DSORG=PS,RECFM=FB)
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISPFILE DD SYSOUT=*
//SYSIN DD DSN=AAA.BBB.CCC(EZTVPGM1),DISP=SHR
//*

Someone please help me on this.

Thanks in advance.

R's,
Prema.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Wed Apr 23, 2008 10:21 am
Reply with quote

Hi,

Either process 5 files in your single Easytreive program. Or you have to execute this program in 5 steps as your input file is different in each case.

Please correct me if I am worng.

KSK
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 Apr 23, 2008 10:25 am
Reply with quote

Hello,

Your requirement would work well if you made a PROCedure for this step and used a symbolic parameter for the .n part of the dsn.

The jobstream would execute this proc 5 times with different .n value for each execution.
Back to top
View user's profile Send private message
Premdev

New User


Joined: 05 Feb 2008
Posts: 24
Location: Coimbatore

PostPosted: Wed Apr 23, 2008 1:24 pm
Reply with quote

Got it now. Thanx icon_smile.gif
Back to top
View user's profile Send private message
samuel_Inba

New User


Joined: 03 Jan 2008
Posts: 53
Location: Chennai

PostPosted: Thu Apr 24, 2008 8:46 am
Reply with quote

hi Premdev,
Can you provide the listing for your requirement which worked out..I have got a simillar kind of work...Will me more helpful if you could share the template of your solution.


Thanks.
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: Thu Apr 24, 2008 8:56 am
Reply with quote

Hello,

You could use something like:
Code:

//THEPROC PROC
//P020    EXEC PGM=SOMEPGM,REGION=4M,TIME=(15,00),COND=(0,NE)
//FILEIN  DD DSN=INPUT.FILE.&FILNUM,DISP=SHR
//FILEOUT DD DSN=OUTPUT.FILE.&FILNUM,
// DISP=(,CATLG,DELETE),
// UNIT=DISK,SPACE=(CYL,(10,20),RLSE),
// DCB=(LRECL=122,DSORG=PS,RECFM=FB)

To execute the PROC for multiple files:
Code:
//somejob  JOB
//FIRST    EXEC THEPROC,FILNUM=1
//SECOND   EXEC THRPROC,FILNUM=2
etc. . .
Back to top
View user's profile Send private message
samuel_Inba

New User


Joined: 03 Jan 2008
Posts: 53
Location: Chennai

PostPosted: Thu Apr 24, 2008 8:58 am
Reply with quote

Thanks a lot for your Immediate response. icon_smile.gif
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: Thu Apr 24, 2008 10:46 am
Reply with quote

You're welcome icon_smile.gif
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Fetch data from programs execute (dat... DB2 3
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
Search our Forums:

Back to Top