Apologies for the long winded question re ISPF panels -
THE BACKGROUND TO THE PROBLEM:
Part of a basic selection panel:
)BODY
+ - - - - Handover Log - - - -
} Option ===>_ZCMD +
+
+ 1. View the Log file
+ 2. Add an entry to the Log file
+ 3. Remove the following entry from the Log file:$Z +
+
+ Select an option or "Q" to Quit
)INIT
.ZVARS = '(PREF)'
)PROC
&ZSEL = TRANS(TRUNC(&ZCMD,'.')
1,'CMD(%HANDOVER,1)'
2,'CMD(%HANDOVER,2)'
3,'CMD(%HANDOVER,3,&pref)'
Q,'EXIT'
' ',' '
*,'?')
)END
If option 3 is selected, Rexx procedure HANDOVER checks that a three digit number has been entered in field PREF:
At the start of the Rexx is:
ARG action
later on:
Parse var action 3 logrefno /* i.e. extract & validate panel variable PREF */
If Datatype(logrefno) \ = "NUM" | Length(logrefno) \= 3 Then
do
Zerrsm = "Invalid Ref; Press F1"
Zerrlm = "The Log file entry must be three digits"
Zerralrm = "YES"
Address ISPEXEC "SETMSG MSG(ISRZ002)"
Signal REXX_EXIT
end
Return
THE PROBLEM:
Can I get this panel to -
a) clear out field PREF when the panel is first displayed, i.e. selected from an earlier panel and also put the cursor on the command line
b) clear out field PREF if, after running Rexx HANDOVER, the error message is not equal to the setting of Zerrsm above, i.e. Zerrsm contains another message such as “Edit successful” and, again, also put the cursor on the command line
c) retain field PREF with its invalid setting if the error message is equal to the setting of Zerrsm above but this time the cursor is on the field in error
or,
should selection panels be just that - a menu where the only option is to select a number or letter?
THE BACKGROUND TO THE PROBLEM:
Part of a basic selection panel:
)BODY
+ - - - - Handover Log - - - -
} Option ===>_ZCMD +
+
+ 1. View the Log file
+ 2. Add an entry to the Log file
+ 3. Remove the following entry from the Log file:$Z +
+
+ Select an option or "Q" to Quit
)INIT
.ZVARS = '(PREF)'
)PROC
&ZSEL = TRANS(TRUNC(&ZCMD,'.')
1,'CMD(%HANDOVER,1)'
2,'CMD(%HANDOVER,2)'
3,'CMD(%HANDOVER,3,&pref)'
Q,'EXIT'
' ',' '
*,'?')
)END
If option 3 is selected, Rexx procedure HANDOVER checks that a three digit number has been entered in field PREF:
At the start of the Rexx is:
ARG action
later on:
Parse var action 3 logrefno /* i.e. extract & validate panel variable PREF */
If Datatype(logrefno) \ = "NUM" | Length(logrefno) \= 3 Then
do
Zerrsm = "Invalid Ref; Press F1"
Zerrlm = "The Log file entry must be three digits"
Zerralrm = "YES"
Address ISPEXEC "SETMSG MSG(ISRZ002)"
Signal REXX_EXIT
end
Return
THE PROBLEM:
Can I get this panel to -
a) clear out field PREF when the panel is first displayed, i.e. selected from an earlier panel and also put the cursor on the command line
b) clear out field PREF if, after running Rexx HANDOVER, the error message is not equal to the setting of Zerrsm above, i.e. Zerrsm contains another message such as “Edit successful” and, again, also put the cursor on the command line
c) retain field PREF with its invalid setting if the error message is equal to the setting of Zerrsm above but this time the cursor is on the field in error
or,
should selection panels be just that - a menu where the only option is to select a number or letter?