Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Hi, I'm not too familiar with t

Hi, I'm not too familiar with t

Hi, I'm not too familiar with t


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 :
ALTER &dsn1 -
NEWNAME(&dsn1.&date.&time) ===> '<= 44' characters
Thank's for your help.

RE: Hi, I'm not too familiar with t

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.


RE: Hi, I'm not too familiar with t

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.

RE: Hi, I'm not too familiar with t

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

RE: Hi, I'm not too familiar with t

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.


RE: Hi, I'm not too familiar with t

Thank's Nic it's Ok now.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close