IBM SC34-5764-01 Server User Manual


 
mail_city = 'DALLAS'; /* prefill the most likely response for city/state */
mail_state = 'TX';
mail_zip = '';
do forever;
'panel send applican cursor(lname)';
if rc > 0 then
call error_routine;
'panel receive applican'; /* pseudo-conversational this would be separate */
if pan.aid = 'PF3' | pan.aid = 'PF12' then
leave;
if pan.aid = 'ENTER' & pan.rea = 124 then
iterate;
if pan.aid = 'CLEAR' | substr(pan.aid,1,2) = 'PA' then
iterate; /* go to beginning of loop */
if rc > 0 then
call error_routine;
/* process the name and address */
end;
'panel end';
exit
error_routine:
Say 'An error has occurred'
return;
** END OF REXX PROGRAM and end of sample.
Defining Panels
When you define a panel it requires two steps:
1. You must first use an editor to create the panel source file in the REXX File System. The panel source
should contain field control characters and the panel layout. The panel layout may contain field control
characters along with regular displayable text characters, and possibly, imbedded variable names.
2. Then you convert the panel source into an intermediate form (panel object) that can be used by the
panel input/output commands. The panel facility automatically generates the intermediate file when the
input/output command that is referencing that panel is first invoked or an explicit command within the
REXX environment (or a REXX exec containing the command) can be invoked to generate the
intermediate file.
Note: This automatic generation is executed whenever the panel object cannot be found or when the
panel source has a date or time change that is later than the panel object. Any change to the
panel source causes a new panel object to be created. Therefore, be cautious when you
change a panel source after a program using that panel is out of the testing phase. It is to your
advantage to move the panel source out of the RFS or into an RFS directory not accessible by
the program after the project goes into production.
Defining the Field Control Characters with the '.DEFINE' Verb
The field control characters define the attributes of fields on the panel. These control characters are
definable by using the .DEFINE verb and must precede the panel layout. The .DEFINE verb is terminated
at 'End of line' unless the continuation character (a comma) is the last character on the line . The
continuation character cannot immediately follow the .DEFINE verb because of the ambiguity of whether
the comma is the control character being defined or a continuation character. Spaces delimit each keyword
and order is unimportant except the control character that is defined must immediately follow the verb. If
any text does not start with .DEFINE in column one it is ignored and treated as a comment unless the line
is a continuation. A total of 32 control characters (including default control characters) can be actively
defined at one time. If all characters are deleted by using the DROP keyword then the five default control
Panel Facility
296
CICS TS for VSE/ESA: REXX Guide