Posted: Wed Nov 23, 2022 3:30 pm Post subject: provide an editor window from within a rexx
Hi
This seems to be a fairly obvious use case but all the googling I did just keeps returning pages on edit macros.
I have create a Rexx script where the user enters a list of elements in a dataset and I open the dataset and read all the members into a stemvariable and process the contents of the stem variable one at a time.
But I wanted to provide additional flexibility where the user doesn't have to create a dataset and edit it to enter the values and save it and so on in advance of running the script.
Instead when the user runs the script, from within the script I want to provide an ISPF edit session to the user to enter the list of elements, one on each line and at the end, hits F3.
The script continues executing. It should process the entered values one by one just like when it read it from the preexisting dataset.
i have a hazy feeling some kind of temp datasets are involved but like I said can't seem to find anything online or even on this forum to help, but I am happy to stand corrected.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Wed Nov 23, 2022 4:37 pm Post subject: Re: provide an editor window from within a rexx
chuck wrote:
Hi
Instead when the user runs the script, from within the script I want to provide an ISPF edit session to the user to enter the list of elements, one on each line and at the end, hits F3.
Chuck,
You can do it with a VPUT in your REXX routine and a VGET in the edit macro that makes the changes
Posted: Wed Nov 23, 2022 4:56 pm Post subject: Re: provide an editor window from within a rexx
chuck wrote:
Hi
This seems to be a fairly obvious use case but all the googling I did just keeps returning pages on edit macros.
I have create a Rexx script where the user enters a list of elements in a dataset and I open the dataset and read all the members into a stemvariable and process the contents of the stem variable one at a time.
But I wanted to provide additional flexibility where the user doesn't have to create a dataset and edit it to enter the values and save it and so on in advance of running the script.
Instead when the user runs the script, from within the script I want to provide an ISPF edit session to the user to enter the list of elements, one on each line and at the end, hits F3.
The script continues executing. It should process the entered values one by one just like when it read it from the preexisting dataset.
i have a hazy feeling some kind of temp datasets are involved but like I said can't seem to find anything online or even on this forum to help, but I am happy to stand corrected.
I think I might have got something.
Code:
"ALLOC DD(SYSIN) NEW REU UNIT(VIO) RECFM(F B) LRECL(80)"
"ISPEXEC LMINIT DATAID(MYEDIT) DDNAME(SYSIN)"
"ISPEXEC EDIT DATAID(&MYEDIT) "
/*user has opportunity to enter data here*/
"EXECIO * DISKR SYSIN (FINIS STEM STEMVAR."
/*do similar processing to like when you read from a regular dataset*/
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
Posted: Thu Nov 24, 2022 5:48 am Post subject:
I was curious with your suggestion (never seen that before).
My question is, what value did you have in MYEDIT (or is the idea that myedit resolves to 'your_userid.MYEDIT', and if so, is that a file that already exists).
When I ran it as-is from your suggestion, I got
Quote:
ISRE177
Missing EDIT/VIEW parm
Either data set, DATAID, or z/OS UNIX file pathname parameter is
required.
Current dialog statement:
EDIT DATAID()
Is there a bunch of code you've left out ? _________________ Michael
I was curious with your suggestion (never seen that before).
My question is, what value did you have in MYEDIT (or is the idea that myedit resolves to 'your_userid.MYEDIT', and if so, is that a file that already exists).
When I ran it as-is from your suggestion, I got
Quote:
ISRE177
Missing EDIT/VIEW parm
Either data set, DATAID, or z/OS UNIX file pathname parameter is
required.
Current dialog statement:
EDIT DATAID()
Is there a bunch of code you've left out ?
Not really. I notice that I left out the /*REXX*/ at the top, but I assume you added that, otherwise you get a different error.
As it stands, if you execute that script it will open an ISPF editor session and let you enter stuff. If you hit F3, it does nothing. You can add these lines to the script to echo what you typed in during the edit session
Posted: Fri Nov 25, 2022 10:47 am Post subject: Re: provide an editor window from within a rexx
kolusu wrote:
chuck wrote:
Hi
Instead when the user runs the script, from within the script I want to provide an ISPF edit session to the user to enter the list of elements, one on each line and at the end, hits F3.
Chuck,
You can do it with a VPUT in your REXX routine and a VGET in the edit macro that makes the changes
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum