This function converts English commands and data into a 3270-compatible data stream. Information is passed to the function as arguments and on the current stack.
stream = $3270([rows],[cols],[{WRITE|ERASE|NONE}],[{ALARM|RESET|RESTORE}])
Parameters
3270 data stream. A command byte and a Write Control Character (WCC) preface this data stream
Number of rows on the screen. The Logon Facility determines the default value.
Number of columns on the screen. The Logon Facility determines the default value.
Indicates that the finished data stream is intended to be written without first erasing the display. The new data overlays and selectively replaces the existing data.
Indicates that the finished data stream is intended to replace completely any existing display.
Indicates that the finished data stream does not contain a command or WCC. The returned data can be appended to another stream that does begin with a command and WCC. This is the default.
Sets the Sound audible alarm flag in the WCC. This can appear in combination with RESTORE and RESET, separated by blanks.
Sets the Restore keyboard flag in the WCC. This can appear in combination with ALARM and RESET, separated by blanks.
Sets the Reset modified data tag flag in the WCC. This can appear in combination with RESTORE and ALARM, separated by blanks.
Commands are passed to $3270() using the current stack. Each command and its accompanying arguments must be complete in one stack record. Multiple commands can appear in a single stack record. Except where otherwise specified, blanks separate commands and arguments. Commands can be uppercase or lowercase. Where row and column coordinates are specified, they are 1-based. That is, row 1 column 1 is the first position on the screen. The following commands are valid:
Use to position the display point to the specified row and column coordinates. The syntax is:
AT row col
Use to move the display point a designated number of positions in any direction. An attempt to move off the screen in any direction results in an error condition. The syntax is:
commandname n
Use to move the insertion point to the beginning of the next line, unless the insertion point is at the beginning of a line. NL can wrap the screen to position 1,1. The syntax is:
NL
Use to copy the data that follows to the screen. No validity checking is performed and the screen can wrap in any direction. The text string is delimited by any special character that is not part of the data itself. In operation, the first non-blank character following the DATA command is used as the delimiter. Data is transferred until the delimiter is encountered again. The remainder of the stack record, if any, is assumed to contain more commands. The syntax is:
DATA /text/
The DATABEGIN command is similar to the DATA command, except that there are no delimiters. Instead, the text is assumed to begin with the first non-blank character following the blank-delimited command word and continues to the end of the stack record. The syntax is:
DATABEGIN text
Use to indicate that the next stack record is data to be written to the screen. Any remaining commands following DATARECORD in the same stack record are ignored. The syntax is:
DATARECORD
Use to repeat the specified single character n times. Screen wrapping is permitted. The values for char can be any single character, BLANK to repeat a blank, or NULL to repeat a null (binary zero) character. The syntax is:
REPEAT char n
Use to insert a 3270 attribute character with the specified characteristics. Each attribute requires one screen position. The arguments are delimited by any special character that does not appear in the arguments themselves. In operation, the first non-blank character following the ATTRIBUTE command is used as the delimiter. Arguments are processed until the delimiter is encountered again. The remainder of the stack record, if any, is assumed to contain more commands. The syntax is:
ATTRIBUTE [MDT] [HIGH] [NODISP] [PROT] [NUM] [SKIP]
Use to position the cursor to the current display position. The syntax is:
CURSOR
ARG n MISSING OR INVALID
WCC not ALARM RESTORE RESET
INVALID AT ROW recnum data
INVALID AT COL recnum data
AT ROW TOO LARGE recnum data
AT COL TOO LARGE recnum data
FN ERROR n type xxxx recnum data
INVALID UP recnum data
UP OFF SCREEN recnum data
INVALID DOWN recnum data
DOWN OFF SCREEN recnum data
INVALID LEFT recnum data
LEFT OFF SCREEN recnum data
INVALID RIGHT recnum data
RIGHT OFF SCREEN recnum data
NO DATA AFTER DATARECORD recnum data
INVALID REPEAT CHAR recnum data
INVALID REPEAT COUNT recnum data
INVALID COMMAND: cmd recnum data
Example
queue 'at 1 1 attr /prot/ data /Enter ID =>/ attr /input high /' queue 'cursor right 8 attr /prot/' queue 'at 2 1 attr /prot/ data /Password =>/ attr /input nondisp/' queue 'right 8 attr /prot/' do i = 1 to canned_msg.0 queue 'nl datarecord' queue canned_msg.i end i screen = $3270(,,'erase','reset restore') if rc ^= 0 then signal error
Copyright © 2014 CA Technologies.
All rights reserved.
|
|