Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Looping in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
suvarna

New User


Joined: 24 Aug 2005
Posts: 13

PostPosted: Wed Aug 24, 2005 2:46 pm    Post subject: Looping in JCL
Reply with quote

Is it possible to loop in JCL?
That is i want to insert around 20 DD DSN='file name', DISP=SHR for each file name.This is for the purpose of merging all these files to a single report file.
Now I am manually inserting each of these steps. If I have these file names in a seperate file is it possible by some means to insert DD DSN='file name', DISP=SHR for each of these files and then do a merge for these files?
Back to top
View user's profile Send private message

MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Wed Aug 24, 2005 4:21 pm    Post subject:
Reply with quote

As you describe your problem I suppose that you want to append your files to an output, is true?
My advise is to connect/concatenate your input as show in the JCL User's Guide at the link below:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IEA5B506/4.2.1.4?DT=19971021190515

This advise has one mainly reason: if you append data(with disposition MOD in ouptut) you must create first a dataset with correct space not released and so you may have two(but only one of that) problem: first is that space is not enough; the second is that unnecessary space, at the end of your work is not released.

If you want to persevere with MOD disposition you must to know that JCL can't loop but can only restart and to do what you need you can use: or a restart or a proc instream or catalogued.

In every case I suggest you to search in this forum before posting because this argument is aleady treated.
Back to top
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 85
Location: In my tiny cubicle ...

PostPosted: Wed Aug 24, 2005 6:27 pm    Post subject: Re: Looping in JCL
Reply with quote

If the dataset names are listed in another dataset, why not just use an INCLUDE statement to use the list:

Example: the PDS 'MY.PARMLIB(LIST)' contains the list of datasets for concatenation:
//SYSUT1 DD DISP=SHR,DSN=MY.DSN1
// DD DISP=SHR,DSN=MY.DSN2
....
// DD DISP=SHR,DSN=MY.DSN20

Then, use this member in your job:

Code:

//MYJOB JOB (acctg,....)
//*
// JCLLIB ORDER=MY.PARMLIB
//*
//STEPXXXX EXEC PGM=IEBGENER
// INCLUDE MEMBER=LIST
//SYSUT2 DD DSN=MY.NEW.COMB.DSN,DISP=(MOD,CATLG,DELETE),...
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
Back to top
View user's profile Send private message
ajayvamsi
Currently Banned

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Thu Sep 01, 2005 2:51 am    Post subject:
Reply with quote

Hi Prandip,
u r right u can specify thru INCLUDE statment and the path of that member can be specified the JCLLIB ...thanks
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 Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Looping in REXX and pass data to JCL. PeterHolland CLIST & REXX 24 Wed Jan 11, 2012 6:08 pm
No new posts JOIN UNPAIRED looping with 3 key fiel... madmartinsonxx DFSORT/ICETOOL 7 Thu Jul 21, 2011 7:11 pm
No new posts AICA abend due to looping problem in ... somnath.barik CICS 2 Tue Jan 11, 2011 8:21 pm
No new posts Problem related Looping in JCL GauravKudesiya JCL & VSAM 18 Wed Sep 16, 2009 4:00 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us