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
 

 

How to get record in input file as Return code of the step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sri_code

New User


Joined: 20 Nov 2006
Posts: 19
Location: india

PostPosted: Mon May 19, 2008 7:50 pm    Post subject: How to get record in input file as Return code of the step
Reply with quote

I have a requirement to set the the number of records as return code of my step.

Thanks,
Srinivas.
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: Mon May 19, 2008 8:40 pm    Post subject:
Reply with quote

Hello,

Hopefully, you have a very small file. . .

The highest rc that can be set is 4095.

If you explain what you really need to do (what you've asked is not what you need to do, but how you want to solve it), someone may have suggestions.
Back to top
View user's profile Send private message
sri_code

New User


Joined: 20 Nov 2006
Posts: 19
Location: india

PostPosted: Tue May 20, 2008 9:57 am    Post subject: How to execute steps in a jcl based on number of versions of
Reply with quote

dick scherrer wrote:
Hello,

Hopefully, you have a very small file. . .

The highest rc that can be set is 4095.

If you explain what you really need to do (what you've asked is not what you need to do, but how you want to solve it), someone may have suggestions.


I need to get number of versions a GDG holds and based on this I need to execute those many number of steps in a JCL, so that all GDG versions are modified.
One solution I thought is:
I will have GDG version names in a flat file based on this record count I can execute those many number of steps in a JCL.
1) If record count of a flat file is 0 then all steps should be skipped.
2)If record count is N then it should execute N steps or single step N times by taking input DSN as first record for first loop or step, second record for second loop or step and so on from flat file till N is reached.
This should be done using JCL only.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Tue May 20, 2008 10:12 am    Post subject: Reply to: How to get record in input file as Return code of
Reply with quote

Quote:
This should be done using JCL only.


Jcl only will not do it icon_evil.gif

programs will set return codes, JCL will interpret the return codes
and execute or skip the steps according to the way You write it

to achieve any result You need to execute some program...
in Your case for example :
to list the GDG generations You need to execute the IDCAMS utility
to count the occurrences of the generations You need to write a program or use an utility like SORT
IIRC( If I Remember Correctly) SORT will only let You set some fixed return codes ( YES NO style )
so I guess You are bound to write something Yourself
but, unfortunately, not using JCL only

in this case the most reasonable choice would seem to build the JCL dynamically based on a catalog listing of Your GDG
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: Tue May 20, 2008 10:19 am    Post subject:
Reply with quote

Hello,

Quote:
I need to get number of versions a GDG holds and based on this I need to execute those many number of steps in a JCL, so that all GDG versions are modified.
What is to be modified? Keep in mind that the count will not provide what you need. One way or another the list of active generations becomes not contiguous.


Quote:
in this case the most reasonable choice would seem to build the JCL dynamically based on a catalog listing of Your GDG


I'm with Enrico - i believe your best bet is to generate the needed jcl from a list of the current generations.
Back to top
View user's profile Send private message
sri_code

New User


Joined: 20 Nov 2006
Posts: 19
Location: india

PostPosted: Tue May 20, 2008 11:30 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Quote:
I need to get number of versions a GDG holds and based on this I need to execute those many number of steps in a JCL, so that all GDG versions are modified.
What is to be modified? Keep in mind that the count will not provide what you need. One way or another the list of active generations becomes not contiguous.


Quote:
in this case the most reasonable choice would seem to build the JCL dynamically based on a catalog listing of Your GDG


I'm with Enrico - i believe your best bet is to generate the needed jcl from a list of the current generations.

Thanks for reply.
I prepared the flat file using IDCAMS and ICETOOL which contains version names as records.Here flat file can be updated on the fly by submitting JCL.Can I use this flat file and prepare JCLs dynamically which takes input file name from records in flat file. This should be done without the help of REXX or COBOL.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm


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