DCL SYSPTR .MISCRNIO; DCL DD RESOLVE CHAR(34); DCL DD RESOLVE-TYPE CHAR( 2) DEF(RESOLVE) POS( 1) INIT(X'0201'); DCL DD RESOLVE-NAME CHAR(30) DEF(RESOLVE) POS( 3); DCL DD RESOLVE-AUTH CHAR( 2) DEF(RESOLVE) POS(33) INIT(X'0000'); DCL SPCPTR .CONTROL INIT(CONTROL); DCL DD CONTROL CHAR(8); DCL DD CTRL-OPCODE CHAR(1) DEF(CONTROL) POS(1); DCL DD CTRL-CMD-KEY ZND(2,0) DEF(CONTROL) POS(2); DCL DD CTRL-CURSOR-POSITION CHAR(5) DEF(CONTROL) POS(4); DCL DD CTRL-CURSOR-ROW ZND(2,0) DEF(CTRL-CURSOR-POSITION) POS(1); DCL DD CTRL-CURSOR-COL ZND(3,0) DEF(CTRL-CURSOR-POSITION) POS(3); DCL SPCPTR .SCREEN INIT(SCREEN); DCL DD SCREEN CHAR(10) INIT("T010310010"); DCL DD TITLE CHAR(10) INIT("Testscreen"); DCL DD * CHAR(10) INIT("L010420000"); DCL DD * CHAR(10) INIT("T030010030"); DCL DD * CHAR(30) INIT("Strong Input . . . . . . . . "); DCL DD * CHAR(10) INIT("q030310010"); DCL DD STRONG-INPUT CHAR(10) INIT(" "); DCL DD * CHAR(10) INIT("L030420030"); DCL DD * CHAR(30) INIT(" <== Convert input to UPPER "); DCL DD * CHAR(10) INIT("L040010030"); DCL DD * CHAR(30) INIT("Normal Input . . . . . . . . "); DCL DD A-NORMAL-INPUT CHAR(10) INIT("I040310010"); DCL DD NORMAL-INPUT CHAR(10) INIT(" "); DCL DD * CHAR(10) INIT("L040420030"); DCL DD * CHAR(30) INIT(" <== No conversion "); DCL DD * CHAR(10) INIT("L050010030"); DCL DD * CHAR(30) INIT("Protected Input . . . . . . "); DCL DD * CHAR(10) INIT("P050310010"); DCL DD PROTECTED-INPUT CHAR(10) INIT(" "); DCL DD * CHAR(10) INIT("L050420032"); DCL DD * CHAR(32) INIT(" <== Copy of above after ENTER"); DCL DD * CHAR(10) INIT("L060010030"); DCL DD * CHAR(30) INIT("Secret Input . . . . . . . . "); DCL DD * CHAR(10) INIT("s060310010"); DCL DD SECRET-INPUT CHAR(10) INIT(" "); DCL DD * CHAR(10) INIT("L060420030"); DCL DD * CHAR(30) INIT(" <== Will not display "); DCL DD * CHAR(10) INIT("L070010030"); DCL DD * CHAR(30) INIT("Option Field . . . . . . . . "); DCL DD * CHAR(10) INIT("O070310010"); DCL DD OPTION-FIELD CHAR(10) INIT("Option 1"); DCL DD * CHAR(10) INIT("L070420030"); DCL DD * CHAR(30) INIT(" <== You can TAB to this "); DCL DD * CHAR(10) INIT("L080010030"); DCL DD * CHAR(30) INIT("Choice Field . . . . . . . . "); DCL DD * CHAR(10) INIT("C080310010"); DCL DD CHOICE-FIELD CHAR(10) INIT("Choice 1"); DCL DD * CHAR(10) INIT("L080420030"); DCL DD * CHAR(30) INIT(" <== You can TAB to this "); DCL DD * CHAR(10) INIT("L100010030"); DCL DD * CHAR(30) INIT("Highlighted text . . . . . . "); DCL DD * CHAR(10) INIT("H100310020"); DCL DD HIGHLIGHTED-TEXT CHAR(20) INIT("Highlighted"); DCL DD * CHAR(10) INIT("L100520020"); DCL DD * CHAR(20) INIT(" "); DCL DD * CHAR(10) INIT("L110010030"); DCL DD * CHAR(30) INIT("Severe message text . . . . "); DCL DD * CHAR(10) INIT("M110310020"); DCL DD FATAL-ERROR-TEXT CHAR(20) INIT("Fatal error"); DCL DD * CHAR(10) INIT("L110520020"); DCL DD * CHAR(20) INIT(" "); DCL DD * CHAR(10) INIT("T150300016"); DCL DD * CHAR(16) INIT("One large field:"); DCL DD * CHAR(10) INIT("L150470000"); DCL DD * CHAR(10) INIT("I150800400"); /* WALL-TO-WALL FIELD */ DCL DD * CHAR(400) INIT(" "); DCL DD * CHAR(10) INIT("L210010000"); DCL DD * CHAR(10) INIT("L220010030"); DCL DD FOUND-AT CHAR(30) INIT(" "); DCL DD * CHAR(10) INIT("U230010079"); /* INFORMATIONAL */ DCL DD PF CHAR(79) INIT("F3=Exit F12=Cancel"); DCL DD * CHAR(10) INIT("T240010079"); /* MESSAGE LINE */ DCL DD MESSAGE-TEXT CHAR(79) INIT(" "); DCL DD * CHAR(10) INIT(".000000000"); /* END OF SCREEN */ DCL OL MISCRNIO(.CONTROL, .SCREEN); CPYBLAP RESOLVE-NAME, "MISCRNIO", " "; RSLVSP .MISCRNIO, RESOLVE, *, *; CPYBLA CTRL-OPCODE, "O"; CALLX .MISCRNIO, MISCRNIO, *; SHOW-SCREEN: CPYBREP CTRL-CURSOR-POSITION, "0"; CPYBLA CTRL-OPCODE, "W"; CALLX .MISCRNIO, MISCRNIO, *; CPYBREP MESSAGE-TEXT, " "; CPYBLA CTRL-OPCODE, "R"; CALLX .MISCRNIO, MISCRNIO, *; CMPNV(B) CTRL-CMD-KEY, 3/EQ(DONE); CMPNV(B) CTRL-CMD-KEY,12/EQ(DONE); CPYBLA PROTECTED-INPUT, NORMAL-INPUT; CMPBLAP(B) NORMAL-INPUT, " ", " "/NEQ(=+3); CPYBLA A-NORMAL-INPUT, "E"; /* MARK AS ERROR */ CPYBLAP MESSAGE-TEXT, "Must not be blank", " ";: CALLI FIND-FIELD, *, .FIND-FIELD; CPYBLA FOUND-AT( 1:5), FIELD-FOUND; CPYBLA FOUND-AT( 7:5), FIELD-START; CPYBLA FOUND-AT(13:5), FIELD-END; CPYBLA FOUND-AT(20:5), CTRL-CURSOR-POSITION; B SHOW-SCREEN; DONE: CPYBLA CTRL-OPCODE, "C"; CALLX .MISCRNIO, MISCRNIO, *; RTX *; DCL CON SCREEN-WIDTH BIN(2) INIT(80); DCL CON FIELD-HEADER-SIZE BIN(2) INIT(10); DCL DD FIELD-ITEM-SIZE BIN(2); DCL MSPPTR .FIELD; DCL DD FIELD CHAR(3574) BAS(.FIELD); DCL DD FIELD-ATTR CHAR(1) DEF(FIELD) POS( 1); DCL DD FIELD-ROW ZND(2,0) DEF(FIELD) POS( 2); DCL DD FIELD-COL ZND(3,0) DEF(FIELD) POS( 4); DCL DD FIELD-SIZE ZND(4,0) DEF(FIELD) POS( 7); DCL DD FIELD-POSITION CHAR(5) DEF(FIELD) POS( 2); /* REDEF */ DCL DD FIELD-FOUND CHAR(5); DCL DD FIELD-START CHAR(5); DCL DD START-ROW ZND(2,0) DEF(FIELD-START) POS(1); DCL DD START-COL ZND(3,0) DEF(FIELD-START) POS(3); DCL DD FIELD-END CHAR(5); DCL DD END-ROW ZND(2,0) DEF(FIELD-END) POS(1); DCL DD END-COL ZND(3,0) DEF(FIELD-END) POS(3); DCL INSPTR .FIND-FIELD; ENTRY FIND-FIELD INT; CPYBREP FIELD-FOUND, "0"; SETSPP .FIELD, SCREEN; NEXT-FIELD: CMPBLA(B) FIELD-ATTR, "."/EQ(.FIND-FIELD); CPYBLA FIELD-START, FIELD-POSITION; ADDN(S) START-COL, 1; : CMPNV(B) START-COL, SCREEN-WIDTH/NHI(=+3); SUBN(S) START-COL, SCREEN-WIDTH; ADDN(SB) START-ROW, 1/POS(=-2);: CPYBLA FIELD-END, FIELD-POSITION; ADDN(S) END-COL, FIELD-SIZE; : CMPNV(B) END-COL, SCREEN-WIDTH/NHI(=+3); SUBN(S) END-COL, SCREEN-WIDTH; ADDN(SB) END-ROW, 1/POS(=-2);: CMPBLA(B) CTRL-CURSOR-POSITION, FIELD-START/LO(ADVANCE-TO-NEXT); CMPBLA(B) CTRL-CURSOR-POSITION, FIELD-END /HI(ADVANCE-TO-NEXT); FOUND-FIELD-WITH-CURSOR: CPYBLA FIELD-FOUND, FIELD-POSITION; B .FIND-FIELD; ADVANCE-TO-NEXT: ADDN FIELD-ITEM-SIZE, FIELD-HEADER-SIZE, FIELD-SIZE; ADDSPP .FIELD, .FIELD, FIELD-ITEM-SIZE; B NEXT-FIELD;