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

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Mon May 19, 2008 8:40 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue May 20, 2008 10:12 am
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

Moderator Emeritus


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

PostPosted: Tue May 20, 2008 10:19 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top