View previous topic :: View next topic |
Author |
Message |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Fri Sep 26, 2003 3:22 am Post subject: automating some steps |
|
|
Hi,
This is my requirement (simplified)
1 Open a new screen (ISPSTRT).
2 Select option "a.b"
3 Type "c" on 10 row 11th column and press enter.
4 Read 12 bytes from 13th row and 14th column and press end.
I am planning to do this using REXX and went through panel related posts but could not make out how to handle steps 3 and 4.
I don't want any emulator based solution as they are very slow, and emulator dependent.
Regards,
Diba. |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Tue Sep 30, 2003 3:38 am Post subject: |
|
|
Okay, I did "ISPEXEC SELECT PANEL(Z0000000)". Now I want to select option 2 through the REXX pgm. How to proceed? |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Tue Sep 30, 2003 3:51 am Post subject: |
|
|
That's simple - "ISPEXEC SELECT PANEL(Z0000000) OPT("2")".
Now in the next panel I again want to select option 2. How to proceed? |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Oct 08, 2003 6:59 am Post subject: |
|
|
Well I am making slow progress. First my code -
Code: |
ZSEL = 16
ZCMD = 16
"ISPEXEC CONTROL NONDISPL ENTER"
"ISPEXEC VPUT (ZCMD,ZSEL) PROFILE"
"ISPEXEC SELECT PANEL(PANV1 )"
"ISPEXEC VGET (ZPF01 ) PROFILE"
|
Problems -
1 I am not able to pass "16" as my selection. Screen is getting blank (and returning appropraite error message).
2 "ISPEXEC CONTROL NONDISPL ENTER" will simulate "Enter". What should I do to simulate "F1"?.
Regards,
Diba. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Oct 08, 2003 9:29 am Post subject: |
|
|
Dibakar,
If your intention is to flip the function keys then you can use the following code.
Code: |
xPfk2Process='07 08 11'
Do I=1 By 1 Until I=Words(xPfk2Process)
nPfk=Right(Word(xPfk2Process,I),2,0)
If xArg='SAVE' Then xKey='ZPF'||nPfk
Else xKey='SAVEPF'||nPfk
Address ISPEXEC 'VGET &xKey PROFILE'
If Rc<>0 Then Leave I
If xArg='SAVE' Then Do
Interpret 'SAVEPF'nPfk'='Value(xKey)
InterPret "ZPF"nPfk "= ''"
End
Else Do
Interpret 'ZPF'nPfk'='xKey
InterPret "SAVEPF"nPfk "= ''"
End
Address ISPEXEC 'VPUT (ZPF'nPfk 'SAVEPF'nPfk ')PROFILE'
If Rc<>0 Then Leave I
End
Return
|
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Fri Oct 10, 2003 3:27 am Post subject: |
|
|
No I don't want to interchange keys. I was looking for a way to press a key thru a REXX pgm -
Code: |
ZPFKEY = 'PF01'
"ISPEXEC VPUT (ZPFKEY ) SHARED "
|
But it gives error - Variable 'ZPFKEY' is reserved by the system." So maybe there is some other way out.
Regarding my main problem, I am trying to select option 16 in the panel as defined -
Code: |
SYS2.ATSLIB.ISPPLIB(PANV1) - 01.02
===>
***************************** Top of Data ********
%----------------------- PA...
%SELECT OPTION ===>_ZCMD
%
% 1+- PAN A (ADD ==> SPF) %8+- PAN
...
% %16+- PAN
...
)INIT
.HELP = TPAN
)PROC
&ZSEL = TRANS( TRUNC (&ZCMD,'.')
1,'CMD(%PAN01V1)'
...
16,'CMD(%PANUTL)'
*,'?'
)
)END
|
My REXX looks like -
Code: |
ZCMD = 16; ZSEL = 'CMD(%PANUTL)'
"ISPEXEC VPUT (ZCMD,ZSEL ) SHARED "
"ISPEXEC CONTROL NONDISPL ENTER"
"ISPEXEC SELECT PANEL(PANV1 )"
|
But somehow option 16 is not going into it.
While revewing this post, I got a soln -
"ISPEXEC SELECT PANEL(PANV1 ) OPT(16)"
Now doing further testing ..
Regards,
Diba. |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Fri Oct 10, 2003 5:28 am Post subject: |
|
|
Next Step, I need to trap the message/error thrown by the panel. Help! |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Tue Oct 14, 2003 4:15 am Post subject: |
|
|
 |
|
Back to top |
|
 |
|
|