Form DEMO_CALLS /* © Copyright 2005 Hewlett-Packard Development Company, L.P. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. */ /* This form is intended to demonstrate the 5 calls available with DECforms The enable call will cause a welcome panel to appear. HELP is available. Subsequent calls transfer data and select which call(s) are used next. */ Form Data FIRST_TIME Word Integer Value 1 CALL_TYPE Character(1) SEND_COUNT Integer(4) SEND_TEXT Character(26) RECEIVE_COUNT Integer(4) Value 1 RECEIVE_TEXT Character(26) Value "ABCDEFGHIJKLMNOPQRSTUVWXYZ" End Data Form Record RECEIVE_RECORD CALL_TYPE Character(1) RECEIVE_COUNT Word Integer RECEIVE_TEXT Character(26) End Record Form Record SEND_RECORD CALL_TYPE Character(1) SEND_COUNT Word Integer SEND_TEXT Character(26) End Record Layout CC Device Terminal VT100 Type %VT100 End Device Size 24 Lines by 80 Columns Viewport FIRST_VP Lines 1 Through 21 Columns 1 Through 80 End Viewport Viewport WELCOME_VP Lines 1 Through 20 Columns 1 Through 80 End Viewport Viewport HELP_VP Lines 9 Through 24 Columns 1 Through 80 End Viewport Viewport MESSAGE_VP Lines 22 Through 24 Columns 1 Through 80 End Viewport Function TRANSMIT /* RETURN to program */ Is %DO %PF3 End Function Function FINISH /* tell program to go away */ Is %F10 %CONTROL_Z End Function Function UP ITEM Is %UP End Function Function DOWN ITEM Is %DOWN End Function Function CHANGE_CALL Is %SELECT %KP_PERIOD End Function Function LEFT_ITEM Is %LEFT End Function Function RIGHT_ITEM Is %RIGHT End Function Enable Response /* The WELCOME_PANEL is displayed when the form is enabled */ Activate Wait on WELCOME_PANEL Request Exit Response Display TEST_PANEL End Response End Response Disable Response Remove All End Response Receive Response RECEIVE_RECORD Activate Field RECEIVE_COUNT on TEST_PANEL Field RECEIVE_TEXT on TEST_PANEL Request Exit Response Let FIRST_TIME = 0 End Response End Response Transceive Response SEND_RECORD RECEIVE_RECORD Activate Field RECEIVE_COUNT on TEST_PANEL Field RECEIVE_TEXT on TEST_PANEL Request Exit Response Let FIRST_TIME = 0 End Response End Response Function Response FINISH Return " FXIT" End Response Message Panel MESSAGE_PANEL Viewport MESSAGE_VP End Panel Panel TEST_PANEL Viewport FIRST_VP Display %Keypad_Application Function Response NEXT HELP Enter Help End Response Use Help Panel WELCOME_PANEL_HELP Literal Text Line 3 Column 7 Value "Demonstration of forms$xxx calls" Display Font Size Double High End Literal Literal Rectangle Line 5 Column 21 Line 8 Column 35 End Literal Literal Rectangle Line 5 Column 38 Line 8 Column 52 End Literal Icon TRANS_CALL_USED Concealed When (CALL_TYPE = "S") Display Bold Literal Text Line 6 Column 14 Value "-->" End Literal Literal Text Line 7 Column 3 Value "being used" End Literal Literal Text Line 6 Column 3 Value "Call" End Literal End Icon Icon T_BUTTON Entry Response Message "" Message "" Message "Press SELECT or KP_period to change to use TRANSCEIVE" End Response Function Response CHANGE_CALL Let CALL_TYPE = "T" End Response Function Response RIGHT_ITEM Position To Icon SR_BUTTON On TEST_PANEL End Response Active Highlight Bold Highlight Reverse When (CALL_TYPE = "T") Literal Text Line 7 Column 23 Value " " End Literal Literal Text Line 6 Column 23 Value "Transceive" End Literal End Icon Icon SR_BUTTON Entry Response Message "" Message "" Message "Press SELECT or KP_period to change to use "- "SEND/RECEIVE" End Response Function Response CHANGE_CALL Let CALL_TYPE = "S" End Response Function Response LEFT_ITEM Position To Icon T_BUTTON On TEST_PANEL End Response Active Highlight Bold Highlight Reverse When (CALL_TYPE = "S") Literal Text Line 6 Column 42 Value " Send " End Literal Literal Text Line 7 Column 42 Value "Receive" End Literal End Icon Icon SR_CALLS_USED Concealed When (CALL_TYPE = "T") Display Bold Literal Text Line 7 Column 61 Value "being used" End Literal Literal Text Line 6 Column 61 Value "Calls" End Literal Literal Text Line 6 Column 55 Value "<--" End Literal End Icon Literal Rectangle Line 10 Column 1 Line 15 Column 38 End Literal Literal Text Line 10 Column 3 Value " Data to be sent to the program: " Display Reverse End Literal Literal Rectangle Line 10 Column 42 Line 15 Column 80 End Literal Literal Text Line 10 Column 44 Value " Data received from the program: " Display Reverse End Literal Literal Text Line 12 Column 3 Value "Count:" End Literal Field RECEIVE_COUNT Line 12 Column 10 Entry Response Message "Enter data and press DO or PF3 when ready..." Message "press EXIT (F10 or control_Z) when finished..." Message "use up arrow to change the call type" End Response Function Response UP ITEM Activate Icon T_BUTTON on TEST_PANEL Icon SR_BUTTON on TEST_PANEL Position To Icon T_BUTTON On TEST_PANEL End Response Display Underlined Input Picture 9999 End Field Literal Text Line 12 Column 45 Value "Count:" End Literal Field SEND_COUNT Line 12 Column 52 Output Picture 9999 Protected End Field Literal Text Line 14 Column 3 Value "Text:" End Literal Field RECEIVE_TEXT Line 14 Column 10 Function Response UP ITEM Activate Icon T_BUTTON on TEST_PANEL Icon SR_BUTTON on TEST_PANEL Position To Icon T_BUTTON On TEST_PANEL End Response Display Underlined Input Picture X(26) End Field Literal Text Line 14 Column 45 Value "Text:" End Literal Field SEND_TEXT Line 14 Column 51 Output Picture X(26) Protected End Field Icon NOTE_ICON Concealed When (FIRST_TIME = 1) Literal Text Line 16 Column 43 Value "Note that the count field has been" End Literal Literal Text Line 17 Column 43 Value "incremented by 1" End Literal Literal Text Line 18 Column 43 Value "and that the text field has been" End Literal Literal Text Line 19 Column 43 Value "reversed" End Literal End Icon Literal Text Line 21 Column 1 Value " Messages: "- " " Display Reverse End Literal End Panel Panel WELCOME_PANEL Viewport WELCOME_VP Remove /* We want the form to go on to the next panel for any key except help. The way to do this is to declare the function response for help at this level, and then trap everything else with the BUILTIN, USER, and UNDEFINED function responses. */ Function Response NEXT HELP Enter Help End Response Function Response BUILTIN FUNCTION Return End Response Function Response USER FUNCTION Return End Response Function Response UNDEFINED FUNCTION Return End Response Use Help Panel WELCOME_PANEL_HELP Literal Text Line 2 Column 27 Value "Welcome to the" Display Font Size Double Wide End Literal Literal Text Line 5 Column 27 Value "DECforms V4.0" Display Font Size Double High End Literal Literal Rectangle Line 15 Column 48 Line 18 Column 79 End Literal Literal Text Line 16 Column 49 Value "For instructions, press HELP." End Literal Literal Text Next Line Same Column Value "To continue, press RETURN." End Literal Literal Text Next Line -10 Column 7 Value "Demonstration of the FORMS$xxx calls" Display Font Size Double High End Literal End Panel Help Panel WELCOME_PANEL_HELP Viewport HELP_VP Remove Function Response NEXT ITEM Exit Help End Response Literal Rectangle Line 1 Column 1 Line 15 Column 80 End Literal Literal Text Line 1 Column 3 Value " Help "- " " Display Reverse End Literal Literal Text Line 2 Column 5 Value "This demonstration shows you how the forms$xxx calls "- "work. By watching" End Literal Literal Text Line 3 Column 5 Value "the fields on the main panel, you can see data "- "transferred between the " End Literal Literal Text Line 4 Column 5 Value "program and the form using the type of call selected." End Literal Literal Text Line 6 Column 5 Value "Look at the program and form sources to see how this "- "is achieved." End Literal Literal Text Line 7 Column 5 Value "Define forms$trace as 1 to see what activity goes on "- "at run-time." End Literal Literal Text Line 8 Column 5 Value "The (COBOL) program is called FORMS$DEMO_CALLS.COB and "- "the form is" End Literal Literal Text Line 9 Column 5 Value "called FORMS$DEMO_CALLS.IFDL. A trace file would be "- "FORMS$DEMO_CALLS.TRACE." End Literal Literal Text Line 11 Column 5 Value "Use the up arrow key to move up to the TRANSCEIVE and "- "SEND/RECEIVE icons" End Literal Literal Text Line 12 Column 5 Value "and use the SELECT or keypad-period keys to change the "- "type of call" End Literal Literal Text Line 13 Column 5 Value "being used." End Literal Literal Text Line 13 Column 17 Value "Down arrow will take you back down to the data fields." End Literal Literal Text Line 14 Column 53 Value " Press RETURN when ready..." Display Reverse End Literal End Panel End Layout End Form