This function builds and decomposes IBM 3270 data streams.
Form 1:
string = DS3270(TO,{RA,[trows],[tcols],row,col,[char]}) {SBA,[trows],[tcols],row,col} {SF,[attributes]}
Form 2:
rowcol = DS3270(FROM,SBA,[trows],[tcols],sba)
Form 3:
aid = DS3270(FROM,PARSE,[trows],[tcols],image)
Form 4:
text = DS3270(FROM,FIELD,[trows],[tcols],row,col,image)
Parameters
3270 data.
Converts to a 3270 data stream.
Produces a three-byte SBA sequence.
Produces a four-byte RA sequence (if char is not specified, only 3 bytes are generated).
Total rows on the display screen.
Total columns on the display screen.
Specific row position, 1-based.
Specific column position, 1-based.
Single character to be repeated to the screen address specified by row, col. This is only valid for an RA operation. The character is repeated up to but not into the screen position that row, col specifies.
Produces a 2-byte SF sequence.
One or more of the following attributes:
Displays the field in high intensity.
Modified data tag. When set, the field is returned as input.
Note: This value can be reset by the terminal operator for unprotected fields. Protected fields cannot be altered by the operator or cannot be prevented from being transmitted.
Makes the field invisible on the screen.
For an input field, only numeric data can be physically entered.
Makes the field pen-selectable.
Protects the field.
During data entry, when the cursor moves onto a SKIP attribute (protected field only), the cursor immediately skips to the next input field.
Default:The field is available for terminal operator input.
ARG n MISSING OR INVALID
FIELD NOT PRESENT
Example
/* This Example processes a logon screen and extracts the input */ input = lu2('sendrec',rpl,screen) if rc ^= 0 then signal error_lu2 x = ds3270('from','parse',,,input) parse upper var x aid . if aid = 'PF3' then exit limit = queued() if limit ^= 6 then do say 'Invalid field count on logon screen' return end parse pull row.1 col.1 /* get coordinates of user ID */ parse upper pull userid . parse pull row.2 col.2 /* get coordinates of password */ parse upper pull password . parse pull row.3 col.3 /* get coordinates of program */ parse upper pull program . return
Copyright © 2014 CA Technologies.
All rights reserved.
|
|