View previous topic :: View next topic |
Author |
Message |
to_agrawals Beginner

Joined: 12 Dec 2002 Posts: 26 Topics: 16
|
Posted: Mon Jun 23, 2003 2:11 am Post subject: REXX interaction with ISPF |
|
|
Hi,
We wish to drive the flow of an online application through REXX. The online app is using ISPF panels as the front end. Is it possible to pass values to this app and then simulate enter to go to next screen. The values can be stored initially in some temp variables.
Alternatively, can a simple procedure of going to option 3.4 (from the main menu screen) and putting the dataset name for retrieval be done through REXX..?
I need details on how to interact with ISPF panels through REXX. Please help.
Thanks
Saurabh |
|
Back to top |
|
 |
dorkhead Beginner
Joined: 07 Jan 2003 Posts: 25 Topics: 0 Location: Lux
|
Posted: Wed Jun 25, 2003 3:42 am Post subject: |
|
|
you can
1 create your own copy of panel you want to display with .resp=ENTER in the
init section of that panel
2 fill variables required by ispf in your REXX
3 call display of panel in your REXX
here is some code that displays SPACE on a volume using ISPF 3.4 listing :
Code: |
/* REXX */
arg vol
trace off
address tso
"free fi(junk)"
"free fi(junk1)"
if vol = '' then do until vol ^= ''
say 'plz enter a volume or exit '
pull vol
end
if vol=exit then exit
else nop
zddnvol=vol
zddnskp='0'
"ALLOC FI(JUNK) DA('"USERID()".TEMP.PANEL') NEW DELETE TRACK
SPACE(2 1) RECFM(F B) LRECL(80) BLKSIZE(3120) DIR(1)"
"ALLOC FI(JUNK1) DA('"USERID()".TEMP.PANEL(udlp)') shr reuse "
/* this is the panel */
queue ")ATTR "
queue "? type(output) "
queue ")body cmd() "
queue "_zcmd +?ZDLPVL+"
queue ")init "
queue "VGET (ZDDNVOL) shared "
queue "&zcmd = &Z "
queue "&zuopt= V "
queue "&zDLPVL= &ZDDNVOL "
queue "IF (&ZDDNSKP NE '1') .RESP = ENTER"
queue "ELSE .RESP = END "
queue "&zddnskp= '1' "
queue ")reinit "
queue ".RESP = END "
queue ")proc "
queue ")end "
/* en of panel */
say queued()
address ispexec
"LMINIT DATAID(DID) DDNAME(junk)"
"LIBDEF ISPPLIB library id(junk)"
"control errors return"
"control nondispl enter"
"vput (zddnvol) shared"
"vget (zdlpvl)"
oldvol=ZDLPVL
"select pgm(isrudl) parm(udLp)"
zdlpvl=oldvol
"vput (zdlpvl)"
"lmfree dataid("did")"
"libdef ISPPLIB"
address tso
"free fi(junk)"
"free fi(junk1)"
exit 1
|
this example works for me ....
it serves as an example of what I said.
I suggest first you find the name of panel u want to use first
find where they are, view them
and make a copy somewhere.
also as we say RTFM, it may help here.
have fun _________________ Dorkhead |
|
Back to top |
|
 |
to_agrawals Beginner

Joined: 12 Dec 2002 Posts: 26 Topics: 16
|
Posted: Wed Jul 16, 2003 7:11 am Post subject: |
|
|
Thanks Dork,
I was just going through your reply. Sorry for being so late in responding. Actually, after going further deep into the application, I have infered the following:
In my application, the .resp=ENTER code does occur in the init section of each panel. It is a PL/I code which is the ISPF driver and retreives the panel variables. If I try to simulate the enter key through REXX, after supplying the panel values in REXX, I am merely able to drive the ISPF panels and not the actual application. I need to somehow interact with this PL/I code also through REXX so as to make sure that all other functions performed by this PL/I code goes as it was doing before.
Please help and let me know if more inputs are required from my end.
Thanks
Saurabh |
|
Back to top |
|
 |
|
|