Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I'm not too familiar with t

Status
Not open for further replies.

LLuc

Technical User
May 1, 2018
20
0
0
FR
Hi,

I'm not too familiar with the rexx but I'd like to use it in a rename file by idcams by adding the date and time to the input file without exceeding 44 characters
for example :
//SYSIN DD *
ALTER &dsn1 -
NEWNAME(&dsn1.&date.&time) ===> '<= 44' characters
Thank's for your help.
 
If you have the recent version of z/OS and JCL you may be able to do what you want by using system variables - no Rexx, or any other language, required. Check the JCL manual.

If you really have to do it programmatically then this is a rough outline:
If not running in batch allocate the jcl member to be edited
If runnung in batch include a DD statement for the same - saves allocation woes!
Read the JCL using EXECIO. You can read into a stem and if you use * as the number of records to read then all will be read in and yourstemname.0 will be populated with the record count.
Traverse the stem until you find the record to be changed
Get the date and time using the date function and time function.
Manipulate the date and time into the format that you want
Reconstruct the record with your information and store it back at the same spot in the stem.
Use EXECIO to write out the stem specifying yourstemname.0 as the number of records to write.
End run.


Nic
 
Thank you for your reply. But I have to do it absolutely by rexx because the fields of the input variable is provided by a panel in rexx.
 
Sorry, may be I misspoke, the length of the renamed file must not exceed 44 characters because we add the date and time at the end of file
 
If the operating system can do it for you then why not let it?

If you have a current Rexx/ISPF process and you need to modify it to include date and time in the currently generated data set name then you need to look at the existing code to figure out how to modify it. Some one must be tasked with maintaining that code so they would be the people to ask.


Nic
 
Thank's Nic it's Ok now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top