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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using REXX variables in ISREDIT 2

Status
Not open for further replies.

isealey

Technical User
Jan 3, 2005
6
US
I have a situation where I am extracting information from a REXX function and placing it into a REXX variable, such as:

DATE_MONTH = DATE(M)

I am using these REXX variables to allocate files which will be used on a monthly basis, such as:

"ALLOC DA('xxxxxxxx.CCINP."DATE_MONTH"') NEW CATALOG ..."

Information will also be copied from the previous month's file to the new month. I need to update the DATE_MONTH in the new file to reflect that month. I would like to carry the REXX variable DATE_MONTH into an ISREDIT macro to CHANGE the old month to the new month? Is this possible? and how? If not, any recommendations on an alternative. I have read text about ISPF shared variable pools with VGET and VPUT, but I believe those are for Dialog variables, not REXX variables. Any help appreciated. Thanks in advance.
 
You can VPUT and VGET variables to and from either the SHARED or PROFILE pools. Although they are normally used for dialogs, you can just as easily use them for communicating between your REXX procedure and your ISREDIT macro.
 
SteveFF's post is correct, but there's a restriction on ISPF variable names and lengths. Date_Month is invalid because it's 10 characters and I don't think _ is allowed.

You could do;
Code:
[COLOR=blue]DteMonth = Date('M')
Address 'ISPEXEC' "VPut (DteMonth) Shared"[/color]

then in your macro
[COLOR=green]Address 'ISPEXEC' "VGet (DteMonth) Shared"
...[/color]

You can also use PUSH and QUEUE for example;
Code:
[COLOR=blue]Date_Month = Date('M')
queue Date_Month[/color]

then in your macro
[COLOR=green]Parse Pull Date_Month
...[/color]

Also remember that your macro is in REXX (I assume) so you could just calculate the month inside the macro code...
 
You guys are great. Just tested it. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top