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

Cursor positioning in ISPF panels using REXX

Status
Not open for further replies.

allenp

Programmer
Dec 23, 2002
2
US
Hi,

I'm new to rexx and ispf panels. Could you please help me figure out how to position the cursor at a particular field on the panel, when invalid data is entered on the panel field?

Here is a peice of the panel code:
Code:
)init
  .help = compghlp
  .zvars = '(ptype pname ploc)'
  .cursor = &ptype
)proc
  ver (&ptype,NB,list,B,O,b,o)
  ver (&pname,NB,Name)
  ver (&ploc,NB,DSName)

In the rexx, I check if the membername(&pname) exists in the dsn(&ploc) by using the sysdsn function. If the member is not found then I need to position the cursor at the pname field on the panel.

Here is the rexx code that does the checking:
Code:
checkmem = ""ploc"("||pname||")"
x = sysdsn("'"checkmem"'")
if x ¬= 'OK' then
   do
     Address ISPEXEC
     zedsmsg = 'Check name'
     zedlmsg = 'Please check member name'
     "setmsg msg(ISRZ001)"
   end

Please help.

Thanks
Allen.
 
Hi,
while displaying the panel it seems you are using the command DISPLAY PANEL(PANELNAE). Instead, use the following: DISPLAY PANEL(PANELNAME) CURSOR(FIELDNAME).
 
Thanks, it worked.

Could you please let me know about any books or online tutorials that deal with rexx and ispf panels.

Allen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top