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
 
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: 10327
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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