Home
to view the file - Support On Line
Contents
1. 1 5 1 6 2 1 MAINTAIN COMMAND PROCESSOR seen LO ENGE dedu quate 1 6 47 A2 37UJ Rev00 vii 2 1 2 2 2 3 2 4 4 1 4 2 4 2 1 4 2 2 4 3 4 3 1 4 3 2 4 4 4 4 1 4 4 2 4 5 4 5 1 4 5 2 viii IOF Programmer s Manual Line Mode and Forms Mode serere 2 1 OVERVIEW e 2 1 EINE MODE H 2 2 FORMS MODE 2 2 SHARING THE TERMINAL BETWEEN AND 2 3 Character SONS T 3 1 EXTENDED CHARACTER BET isses 3 1 C101 Mod te E eee epee 3 4 PLWMO B E LE 3 4 Terminal Access Method HOW IT WORKS GANA AA ATA TWO IMPORTANT ASPECTS OF THIS FTIIT NAAN OON 4 2 Prefixing and Prompting eee eee 4 2 OUTPUT Edited kA 4 3 Transparent 4 5 AA RN epo MT 4 6 Transparent Mode ea epe 4 6 GCL TERMINAL ASSIGNMENT
2. Horizontal tabulation capability Vertical tabulation capability 6 3 6 3 6 4 IOF Programmer s Manual H TNATTR GET TERMINAL ATTRIBUTES Purpose H TNATTR is used to get the execution mode batch or IOF In the case of IOF H TNATTR returns all information about the terminal from which the interactive program was activated Syntax SH TNATTR o structure Parameters o_ structure Specifies the name of the structure in which the information is returned This structure must be declared by the H_DCTNATTR primitive Return codes Normal DONE Abnormal NONE 47 A2 37UJ Rev00 CSET system variable A activating forms APPEND mode Arabic character set ASGi file assignment batch compatibility C094 character set C101 character set C101 mode C113 character set C114 character set C118 character set CDATTL routine CDATTR routine CDFIDI routine CDGET routine CDMECH routine CDPURGE routine CDRECV routine CDRELS routine CDSEND routine character sets Chinese character set CSET system variable Cyrillic character set 47 A2 37UJ Rev00 Index D DEFi file define 4 8 E EBCDIC character set edited mode ERASE mode F forms activating 5 3 mode 1 412 145 1 GCL interface GCL terminal assignment GPL primitives Greek character set H H_CLOSE primitive H_DCTNATTR primitive H_FD primitive H_GET prim
3. ASGi File Assignment Parameters 4 7 DEFi File Define Parameter Group eere nennen tnnt 4 8 47 2 37UJ Rev00 4 6 4 6 1 4 6 2 4 6 3 4 6 4 4 6 5 4 6 6 4 7 5 1 5 2 5 3 5 4 5 5 5 6 5 7 5 7 1 5 7 2 5 7 3 5 7 4 5 7 5 5 7 6 5 7 7 5 7 8 5 7 9 5 7 10 5 8 Table of Contents GPL PRIMITIVES H FD File 14 9 H OPEN Open NG 4 12 Get Record aaa paaano An ANNA 4 13 PUT Put 14 14 H CLOSE Close FING MR E UR UM 14 15 H TN File declaratlofi adu toi 4 16 OTHER LANGUAGES eter eects ede eee eee Forms Mode SDPI 2 2 5 1 FORM GENERATION sssscssscsssssssssscsssesssesssessnssssssstessesssesssesssesseesseessneestesseessessseesses 5 1 PRINCIPLES OF THE SDPI 5 2 FORM ACTIVATION rtt 5 3 OUTPUT ACTIONS 5 5 INPUT ACTIONS cere 5 5 AA SDPI COBOL STAT
4. If a function key has been pressed and a function key field has been implicitly or explicitly declared at form generation time this field if selected is filled with the rank of the function key The mapping of function keys onto terminal independent ranks is detailed in the GCOS7 Forms User s Guide If the message contains information relative to another form the program is notified through an appropriate enclosure level If the program does not want to receive the pending data it must issue a CDPURGE routine 47 A2 37UJ Rev00 5 5 5 6 5 6 IOF Programmer s Manual TRACES The FORMS runtime package provides traces to debug user programs and to serve as a diagnostic tool in case of problems These traces are activated through the LOG directive under IOF They consist of e A trace of each user routine This trace is issued after each routine is processed it displays all the parameters of the routine after its execution the selection vector and the data record contents when used as well as the routine s return code e A trace of all messages received and sent These messages are designated as INBOUND and OUTBOUND They are traced as they are processed by FORMS Therefore the traces show the anticipation of input message handling e Data structures These are the Data Map which contains internal mapping information generated by MAINTAIN FORM and the terminal independent Preform structure for dynamic forms The last t
5. UF LINE IS 04 COL IS 42 VALUE IS UF LINE IS 04 COL IS 55 VALUE IS END ARRAY NF GRAND TOTAL LINE IS 15 COL IS 50 SCREEN PIC IS 9 99 PR UF LINE IS 01 COL IS 23 VALUE IS PRODUCT TYPE RV UF LINE IS 02 COL IS 04 VALUE IS NAME UF LINE IS 02 COL IS 09 VALUE IS OF UF LINE IS 02 COL IS 12 VALUE IS REPRESENTATIVE UF LINE IS 02 COL IS 58 VALUE IS CODE UF LINE IS 03 COL IS 03 VALUE IS PRODUCT UF LINE IS 03 COL IS 13 VALUE IS UF LINE IS 03 COL IS 18 VALUE IS CODE UF LINE IS 03 COL IS 27 VALUE IS UF LINE IS 03 COL IS 31 VALUE IS QUANTITY UF LINE IS 03 COL IS 42 VALUE IS UF LINE IS 03 COL IS 46 VALUE IS PRICE UF LINE IS 03 COL IS 55 VALUE IS UF LINE IS 03 COL IS 60 VALUE IS TOTAL UF LINE IS 15 COL IS 36 VALUE IS GRAND UF LINE IS 15 COL IS 42 VALUE IS TOTAL 5 26 47 A2 37UJ Rev00 Forms SDPI Interface These data structures are generated SALESI 02 FILLE PIC X VALUE 3 02 FILLE PIC X 8 VALUE SALES 02 SALES NO PIC 9 3 VALUE ZERO 02 SALES MD PIC X VALUE A 02 SALES OF PIC X 8 VALUE SPACES 02 SALES OO PIC 9 3 VALUE ZERO 02 SALES LL PIC 9 3 VALUE ZERO 02 FILLE PIC X 5 VALUE 87097 02 FILLE COMP 1 VALUE 01385 02 SALES AF PIC 9 VALUE 1 02 SAL
6. 47 A2 37UJ Rev00 Terminal Access Method MSG Asynchronous messages are to be accepted Y yes or deferred N no FORCEWRITE The contents of the buffer associated with the terminal are sent to the terminal It is only meaningful in OUTPUT or APPEND processing modes Constraints If this primitive is executed on a data management file the abnormal return code FUNCNAV is returned and no action is taken 47 A2 37UJ Rev00 4 17 4 7 4 18 IOF Programmer s Manual OTHER LANGUAGES The features of the standard programming languages COBOL FORTRAN which handle access to a conventional sequential file also apply to the case where a terminal is being used instead However the terminal must be assigned via GCL For more information about such data management interfaces refer to the appropriate programming language manual However parameters specific to the terminal see the H TN primitive in Section 4 such as the temporary prompt and transparent mode are not available through these languages For example to switch a terminal into transparent mode dynamically from a COBOL program you must call a GPL procedure that uses the H TN primitive An example of a COBOL program that reads from and writes to a terminal until an end of file string default value EOS is encountered is given below IDENTIFICATION DIVISION PROGRAM ID TERM I O THIS PROGRAM ILLUSTRATES THE USE OF A TERMINAL AS A SEQUENTIAL FILE FOR INP
7. C114 C118 Arabic character set Greek character set C113 Cyrillic character set C094 Chinese character set PLE Pluri Lingual East character set 47 A2 37UJ Rev00 3 3 3 1 1 3 1 2 3 4 IOF Programmer s Manual PLE Pluri Lingual East is a character set which contains most of the characters used in those Eastern European languages which use the Latin alphabet The set includes the usual alphanumeric characters plus the accented characters letters with cedilla diacritical marks the stroke etc PLE is like PLW an extended character set and subject to the same considerations C101 Mode The terminal is assumed to operate in 95 character C101 mode Where possible presentation control forces it to operate in this mode A program which operates in C101 mode can send receive only characters which belong to the C101 subset of EBCDIC All other characters are considered to be invalid characters and they are replaced by a substitution character This substitution character is contained in the system variable INVCHAR The value of this variable can be modified either by the terminal operator or by the program The default value of this variable is PLW Mode Extended character set usage is the same for PLW and PLE In the following discussion of PLW it is assumed that the same considerations hold true for PLE When a program operates in PLW mode it is allowed to send and receive all t
8. etc As regards counting of lines internally to maintain the cursor position IOF assumes that the cursor position must be incremented by one line 47 A2 37UJ Rev00 4 5 4 4 4 4 1 4 4 2 4 6 IOF Programmer s Manual INPUT Edited Mode The data records which are delivered by the access method do not contain any presentation characters such as carriage return line feed etc Therefore there are several points the programmer should know as regards presentation in edited mode e Tabulation by using the system variable EXPTABS a programmer can choose between either having tabs automatically expanded as blank characters as text is entered This is the default value for EXPTABS or not having tabs expanded They are passed embedded in the input text Further if the ifn is in SSF format a special Control Record CR 131 is generated e Text over several lines the user can define a text continuation character by means of the system variable CC then use this character as the last character of an input line before transmitting the line All lines entered this way are considered as parts of the same record The programmer can eliminate this continuation facility by setting the variable to a zero length string Files in SSF format record headers and control records can be used in inputting files in SSF format for example including CR in the file when data is to be tabulated The program must test the
9. otherwise the selection vector field is unaffected one character to be set to 0 provision for future use 5 12 Return Codes Normal 0 DONE AF DONEIDE AB ALMOST A8 SKIPPED Al IGNORED Abnormal 9A BREAK AC ARGERR A3 RCVVIOL A7 RECARERR A1 SEQERR AG NOMATCH A9 DVIDFBID 9H DNSPEC S1 DAMAGED S1 WRONGITM S1 WRONGSTA IOF Programmer s Manual invalid selection vector contents at least one field in error some received fields were not selected they are lost unexpected receive function key a break occurred unexpected parameter turn error the selection vector does not match an active form endpoint not in FORMS mode the creation date of the form does not match the creation date of program structures device not supported invalid endpoint name system error invalid object form contents invalid data map contents 47 A2 37UJ Rev00 5 7 4 Form Activation Purpose Forms Mode SDPI Interface This routine causes a form to be activated Syntax CALL CDGET USING output CD alias Parameters output CD alias format 47 A2 37UJ Rev00 format enclosure level Refer to CD description A structure that identifies the form to be activated and where it has to be mounted on the screen This structure is output by MAINTAIN FORM formnamel and is used as follows If APPEND mode is specified i e the mode field of the format structure is set to A
10. All existing parameters are ignored An ACTUAL declaration of the same ifn must be in another compile unit linked to this one Attributes of a file are normally determined automatically so the ATTRIB parameter can be omitted There are however special cases where the BASED attribute is used with the EMPTY parameter See the GPL System Primitives Reference Manual Specifies the TAM parameters A string of 1 to 12 characters n input this string is sent to the terminal to indicate that an entry can be made i e a H_GET primitive has been issued The default prompt is the ifn string concatenated with a colon and a space that is ifn In output this string is used as an identifier prefix to the text displayed The default prompt is 3 spaces No prompt is generated n input processing mode the terminal is switched to input mode when a H GET primitive is issued without visible notification In output processing mode the text is displayed without a prefix All messages sent to the terminal by any agent other than the interactive step are held until the file is closed or a H_TN primitive with the MSG option is issued for the terminal If several files are simultaneously open for the terminal all messages are held if NMSG is selected for at least one of the files A character string entered at the terminal to simulate an End of File This string may be prefixed by a and terminated by several spaces
11. This is a four character alphanumeric data item that may take these values BI Blink BD Bold i e high intensity Bxxx Background color where xxx may be RED Red YEL Yellow BLU Blue GRE Green CYA Cyan MAG Magenta WHI White BLA Black DFT Default color CN Conceal COS Column Separator CP Cursor position DFT Default rendition i e NBI NHL NRV NCOS NUL BDFT FDFT and normal intensity FT Faint i e reduced intensity Fxxx Foreground color xxx may take the same values as for Bxxx 47 A2 37UJ Rev00 enclosure level 47 A2 37UJ Rev00 Forms Mode SDPI Interface HL Rendition highlighted in a terminal specific manner INIT Initial attributes NBI No blink NCOS No column separator NHL Not highlighted NPR Not protected NRV No reverse video NTR Not transmittable NUL Not underlined PR Protected RV Reverse video TR Transmittable UL Underlined Once an attribute is modified it remains modified until either another CDATTR or CDATTL command specifies a contradictory attribute for the same field or a CDMECH command with INITAT argument is executed When a CP attribute is applied to a protected field the cursor cannot be positioned on that field so it will be positioned either on the first field of the screen to which the CP attribute was given at form generation if any or on the first non protected field of the screen home field The encl
12. W 002 CP E 99 99 OSK OSD 47 A2 37UJ Rev00 Forms SDPI Interface 02 ROSK PIC XX 02 ROEK PIC X 02 ROSD 03 RNET PIC X 4 03 RTR PIC X 4 03 RTYP PIC X 3 03 RNU PIC X PROCEDURE DIVISION PROG STA OVE OVE OVE CONSOLE TO ISQ OSD TO ODC TO OIL 3 TO W LEVEL OVE ALL S TO SALES W OVE ALL SPACES TO SALESR CALL CDGET USING ROO SALESI W LEVEL IF OSK 4 GO TO END PROG MAIN LOOP OVE SPACES TO SALESR OVE S TO SALES V CALL CDRECV USING RIO SALESR W LEVEL SALES SV IF SLASH V R AND SLASH GO TO END PROGC MOVE ALL SPACES TO SALE TITLE V SLASH V REP CODE V REP NAME V E 0 TO ERROR INDICATOR MOVE ZERO TO TOTAL NUM FORM TOTAL D THRU TOTAL F VARYING I FROM 1 BY 1 UNTIL I gt 7 OVI ALL ALL IF ERROR INDICATOR 1 OVE 1 TO W LEVEL CALL CDATTR USING ROQ SALES SW W ATTRIB W LEVEL OVE 3 TO W LEVEL OVE SPACES TO GRAND TOTAL V CALL CDATTL USING SALES SV ATTRIBUTE W LEVEL OVE SALES V TO SALES W GO TO MAIN LOOP OVE 1 TO W LEVEL OVE ALL S TO SALES W CALL CDATTR USING ROQ SALES SW W
13. all forms following the form specified by the old form name and occurrence number fields of the format structure are released and cleared The new form is appended after the old form If the old form and occurrence number fields specify a name consisting of spaces and an occurrence of zero default initialization the new form will be appended to the top of the screen and all other forms are released and cleared If OVERLAY mode is specified i e the mode field of the format structure is set to O the old form and occurrence number fields must specify a name consisting of spaces and an occurrence number of zero The forms that were active are frozen i e they remain visible on the screen but all their fields become protected and they are no longer addressable from the program The new form is activated at the top of the screen There is no checking of overlapping of the newly activated form with other forms If WINDOW mode is specified that is if the field form name MD is set to W the forms that were active are frozen If the form to be activated is already displayed on the screen with the same occurrence number this form is put on top of other forms and made active again with its previous contents Otherwise the form name SL and form name SC fields determine the line and column numbers of the top left corner of the rectangle where the form is to be placed The contents of this rectangle are cleared and the form is made activ
14. formname SF e A terminal independent object member formname of ANY or as many terminal dependent object members as there are terminal types for which the form has been oaded formname of terminaltype These members are created in a binary library BINLIB e Language members in a source library SLLIB These members which contain data structures are retrieved by the application using COPY routines or an equivalent and include members for C Language or macro instructions for GPL Three types of members are generated formnamel defines the form identification It identifies the form and indicates where to mount the form on the screen formnameV defines the selection vector It is used to select variable fields in the form formnameR defines the data record This data record is an image of the variable fields of the form 47 A2 37UJ Rev00 5 1 5 2 5 2 IOF Programmer s Manual The object forms are searched for in these binary libraries according to standard search rules BLIB BINLIB1 BINLIB2 BINLIB3 You can optionally use a UFAS sequential file OUTFILE or a diskette DK to store terminal object members Access to forms is given to the application through the SDPI primitives These primitives will call a forms runtime package which handles the presentation of forms using the object form member created by MAINTAIN FORM For more information about MAINTAIN FORM refer to the GCOS7 Forms User s Guide PRIN
15. ov_ptr OUTLEN The length of the output field which is to receive the record the length includes the SSF header if DATAFORM is SSF MAXLEN The length in bytes of the work area This parameter is only valid in MOVE reference mode If the record obtained from the terminal is longer than the specified work area it is truncated and the normal return code WALIM is given Processing can continue The default is the actual length of the record 47 A2 37UJ Rev00 4 13 4 6 4 4 14 IOF Programmer s Manual Constraints If a function key has been pressed as part of the message to be received two cases may e Either a text previously assigned to this function key is returned as a part of the message and the program is unaware that it came from a function key Or no text has been assigned to this function key in which case the first two characters of the work area are filled with the value of the function key and an appropriate normal return code is sent to the program FUNCKEY In either case if some text has been entered from the keyboard it is appended to the text generated by the function key If the previous primitive issued for this ifn was H_TN with the TRSPRT parameter the data obtained from the terminal is returned without alteration If the previous primitive issued for this ifn was H_TN with a temporary prompt this text is sent to the terminal less prompt before the terminal is turned to input mo
16. 8 02 symbolic source data nam PIC X 12 b 02 text length data nam PIC 9 4 b 02 end key data nam PIC X f 02 status key data nam PIC XX 9 and CD cd name 2 FOR OUTPUT 01 cd alias 2 02 destination count data nam PIC 9 4 VALUE 1 h 02 text length data nam PIC 9 4 b 02 status key data nam PIC 02 error key data nam PIC X b 02 symbolic destination data name PIC X 12 47 A2 37UJ Rev00 5 7 5 7 2 5 8 IOF Programmer s Manual NOTES a The FILLERs in the description are not used b These fields are not used under IOF c This field must contain the string CONSOLE when calling any FORMS service using the input CD d This field must contain the string CONSOLE when calling any FORMS service using the output CD e After a CDRECV service these fields contain the date and the time of day f After a CDRECV service this field returns the enclosure level associated with the received message It may be either of the following 1 further data coming from another form is still to be incorporated in the message 8 all data has been received Control is given to the program g After any FORMS service this field contains the status on completion of the statement The various status keys are detailed in the following routine descriptions h This field must be set to 1 CDSEND Forms Send Purpose This routine causes data in a data record to be transferred to the endpoint ind
17. ATTRIB W LEVEL PERFORM PREP SEND THRU END PREP SEND VARYING J FROM 1 BY 1 UNTIL J gt 7 OVE S TO GRAND TOTAL V OVE TOTAL NUM TO GRAND TOTAL OVE 3 TO W LEVEL CALL CDSEND USING ROO SALESR W LEVEL SALES SV OVE S TO SLASH V CALL CDRECV USING RIO SALESR W LEVEL SALES SV IF SLASH V R AND SLASH GO TO END PROG OVE 1 TO W LEVEL CALL CDRELS USING ROO W LEVEL Lu OVE ALL S TO SALES V OVE ALL SPACES TO SALESR OVE 3 TO W LEVEL CALL CDGET USING ROO SALESI W LEVEL GO TO MAIN LOOP END PROG STOP RUN TOTAL D IF PRODUCT V I NOT R GO TO TOTAL NR 47 A2 37UJ Rev00 5 29 IOF Programmer s Manual IF PRODUCT CODE V I AND QUANTITY V I AND PRICE V I MULTIPLY QUANTITY BY PRICE I GIVING TOTAL MAN MOVE TOTAL MAN TO TOTAL I ADD TOTAL MAN TO TOTAL NUM MOVE ALL SPACES TO SALE LINES V I GO TO TOTAL F TOTAL NR IF PRODUCT CODE V I 5 AND QUANTITY V I 5 AND PRICE V I S MOVE ALL SPACES TO SALE LINES V I GO TO TOTAL F TOTAL ERRO
18. and prompting a user response The interface between the terminal and the rest of the system and processors is the Standard Device Programmatic Interface SDPI The SDPI interface enables you to activate forms from within a program These forms are used in the dialog with the terminal You can create and store such forms using the MAINTAIN FORM processor The SDPI interface is discussed in Section 5 of this manual 47 A2 37UJ Rev00 Introduction 1 6 1 3 MAINTAIN_FORM PROCESSOR You can design forms directly on a terminal using the ICREATE command within the processor or you can specify the form using a COBOL like source form definition language Both these ways of creating forms are described in the GCOS 7 Forms User s Guide This processor takes its input either directly from a terminal or from a library member or file However you are recommended to create forms directly using the ICREATE command of the MAINTAIN_FORM processor You can use commands such as MODIFY TEST and EDIT or FSE to test debug and modify forms For details see the GCOS 7 Forms User s Guide 1 6 2 GCL Interface The GCL interface enables you to use the GCL GCOS Command Language to handle the dialog with the terminal This command language is described in detail in the OF Terminal User s Reference Manual GCL is recommended for all applications that accept large amounts of complex information from the terminal The GCL interface provides fa
19. character data item that may take these values 1 End of record Data is quarantined no message is sent to the terminal 2 End of quarantine The data relative to this command and all previously quarantined data are sent to the terminal The application keeps control 3 End of interaction The data relative to this command and all previously quarantined data are sent to the terminal Control is given to the terminal The default is 1 5 21 5 22 Return Codes Normal 0 DONE AF DONEIDE Abnormal 9A BREAK AC ARGERR A0 SNDVIOL A7 SNDARERR A1 SEQERR 97 OPTERR A6 OBJUNKN AG NOMATCH A9 DVIDFBID or CONFLICT 9H DNSPEC 92 MSGOV S1 DAMAGED S1 WRONGITM S1 WRONGSTA IOF Programmer s Manual invalid selection vector contents a break occurred unexpected parameter turn error the selection vector does not match an active form endpoint not in FORMS mode invalid enclosure level unknown attribute the creation date of the form does not match the creation date of program structures device not supported the attribute conflicts with the form e g because the selected field starts in column 1 invalid endpoint name expansion area overflow system error invalid object form contents invalid data map contents 47 A2 37UJ Rev00 Forms SDPI Interface 5 7 9 CDFIDI Form identification Purpose This routine causes the system to return the name of the form relative to the ne
20. control data record flag and check for a data record each time it receives a control record e Input data on a page mode basis this facility is available only when inputting data in page mode on a synchronous terminal with RETURN and TRANSMIT keys It means that several lines can be entered in a single transmission but delivered record by record to the program This avoids unnecessary swapping in and out and prompting between two consecutive lines All text entered as consecutive lines is saved even if output messages must be displayed before this text has been completely processed by the program However a break command will cancel it being processed For further information on the system variables CC EXPTABS and TABS refer to the GCL Programmer s Manual Transparent Mode Each character entered at the terminal is transmitted to the program 47 A2 37UJ Rev00 Terminal Access Method 4 5 GCL TERMINAL ASSIGNMENT The TAM allows an interactive program to access the terminal in a way fully compatible with sequential file access interfaces Therefore the same program can run either with files or a terminal depending on the environment and the GCL parameters used Note that several files of the same interactive program can share the same terminal but there is no sharing a terminal between several programs An ifn is assigned to a terminal by using these parameters of the EXEC_PG GCL command FILEi and ASGi parameters make thi
21. in one of two presentation modes edited mode or transparent mode Each of these is described below The format of a file either SSF or SARF determines the output presentation of the records of this file SARF is the simpler format having records or lines one after the other Each SSF record contains an 8 byte header and control records which give presentation information page length width etc The essential idea is that in edited mode presentation controls are not included in the data records of a file and it is the IOF access method that handles the presentation following given system and user variables If particular sequences e g escape sequences must be directed to the terminal without any alteration then the transparent mode is used In this case no check on the data is done by the access method The advantage of edited mode is that a programmer can code his program without having to pay attention to the terminal type For example a programmer can indicate that he wants the next record after a blank line without having to prefix this record with carriage return line feed which is not effective on all terminals e g IBM 3270 4 3 1 Edited Mode Screen Presentation The program can specify the screen presentation either implicitly with SARF where each record starts at the beginning of a new line or in the SSF record headers and control records The data part of the record is not to contain presentation character
22. procedure A simple step by step example of using the menus of MAINTAIN FORM to create and modify a form is described in the GCOS 7 Forms User s Guide A few miscellaneous service primitives are presented in Section 6 of this manual 47 A2 37UJ Rev00 2 1 2 Line Mode and Forms Mode OVERVIEW Under IOF there are two modes in which a terminal can be accessed These two modes are Line mode also called Text mode and Forms mode Line mode is where data is input or output as a continuous stream of discrete units either in blocks or character by character It is the simpler mode but is well adapted to editing source programs or text processing Line mode is available on both TTY and block buffered terminals In the case of Line mode the interface handling the liaison between the user at the terminal and the program is the Terminal Access Method TAM With this access method the terminal is seen as at least two separate files an input file and an output file Information is moved to and from these files Forms mode is where the screen is considered as a form or a set of forms Each form is composed of fixed and variable fields Only the variable fields are filled in by the user or program Form mode is available only on some block buffered terminals The interface used to handle this mode is the Standard Device Programmatic Interface SDPI Essentially the terminal is seen as an object with which the program is conversing sending a
23. 37UJ Rev00 Forms Mode SDPI Interface The enclosure level to be associated with the data This is a one character data item that may take these values 1 End of record Data is quarantined no message is sent to the terminal 2 End of quarantine The data relative to this command and all previously quarantined data are sent to the terminal The application keeps control 3 End of interaction The data relative to this command and all previously quarantined data are sent to the terminal Control is given to the terminal The default is 1 a break occurred unexpected parameter turn error invalid enclosure level unknown mechanism device not supported invalid endpoint name invalid object form contents invalid data map contents mechanism not available 5 25 IOF Programmer s Manual 5 8 A PROGRAMMING EXAMPLE This is an example of a COBOL program using a form under IOF The form is called SALES and is used for recording the sales of representatives The program calculates the total sales value for each product and a grand total for the sales of all products If data is entered incorrectly the fields of the corresponding line are highlighted in a terminal dependent way and the data can be re entered The form image of SALES is as follows PRODUCT TYPE NAME OF REPRESENTATIVE ESSA CODE TEE T E 11 se E PROD
24. ATA WORKI 77 KAT 77 77 77 77 01 01 77 77 77 77 01 01 01 01 COM CD 01 02 02 02 02 02 02 02 02 CD 01 I J EVEL DIVISION PIC 999 PIC 9 W I PIG W NBF PIC 9 W ATTRIB PIC SALES SW COPY SALESV REPLACING T X 4 ATTRIBUTE 02 02 02 FILLER PIC FILLER PIC FILLER PIC OTAL MAN PIC OTAL NUM PIC W ATTRIBUT PI W LEVEL PIC X ME SS ARFA 02 SALESI FILLER PIC COPY SALESI SALES SV COPY SALESV SALESR COPY SALESR UNICATION SEC IQ INPUT QUEUE SSAGE DATE 999 VALUE VALUI VALUI X X 9 9 C X 4 4 4 V 7 N 6 X 8 TION O SSAGE TIME X ENGTH D KEY S EN STATUS KEY CO UNT RIQ RISQ PIC RISU PIC RIMD PIC RISS PIC RITL PIC RIEK PIC RISK PIC RIMC PIC OUTPUT B STINATION CO P XT LENGTH I UH AH O ATUS KEY RROR KEY B 02 02 ROQ STINATION RODC PIC ROTL PIC HHHHHHHH rH 9 Ha ENS UNT 9 4 9 4 64 64 NG STORAGE SECTION ERROR INDICATOR PIC 9 VALUI E INIT RAILING V BY
25. CIPLES OF THE SDPI INTERFACE As regards programs access to forms mode is made through SDPI routines which make reference to language members These routines provide a basic way to dialogue with the terminal Each routine results in an action being taken except the CDFIDI routine which is purely informative This action may result either in issuing some kind of message to the terminal CDGET CDSEND CDATTR CDATTL CDMECH CDRELS or in receiving a message CDRECV CDPURGE For each action of the first kind the program can specify an enclosure level in the routine which is used to specify when the message is to be delivered to the terminal and if it is to be delivered immediately whether the program retains the right to send other messages or gives control to the terminal The Receive routine CDRECV returns an enclosure level which tells the user or his program whether the message has been issued and whose turn it is to reply For each routine a return code indicates whether it was successfully completed 47 A2 37UJ Rev00 5 3 Forms Mode SDPI Interface FORM ACTIVATION Activating a form consists of displaying on the screen the fixed fields their initial values and the initial rendition attributes of the variable fields of a form To activate a form the program must issue a CDGET routine referencing a form identification structure that identifies the form and its mode of activation Four activation modes are available AP
26. DIC 3 2 47 A2 37UJ Rev00 Xi IOF Programmer s Manual 47 A2 37UJ Rev00 1 Introduction 1 1 IOF AND BATCH COMPATIBILITY The Interactive Operating Facility IOF available under GCOS 7 offers many powerful programming features but remains largely compatible with traditional Batch programming Among other things the programming tools compilers linker editors debugger etc are the same for IOF and Batch programs are interchangeable programs written with IOF can be run in Batch and vice versa except when dialog is with a terminal as in FORMS mode for example with IOF as in Batch a programmer has access to all files without restriction through the various access methods in both IOF and Batch programming advanced GPL primitives are available all GCOS 7 resources are equally available to IOF and to Batch including cataloged uncataloged and temporary files variable memory SIZE parameter of the EXEC_PG command backing store space CPU 1 2 INTERACTIVE OPERATOR CONTEXT The interactive facilities available under GCOS 7 are intended to provide a user friendly environment maximize programmer productivity provide for easy programming be flexible enough to cater for different and possibly conflicting end user requirements 47 A2 37UJ Rev00 1 1 1 3 1 4 1 2 IOF Programmer s Manual Part 1 of the IOF Terminal User s Ref
27. E USING input CD alias Parameters input CD alias Refer to CD description Return Codes Normal 0 DONE Abnormal 9A BREAK a break occurred A1 SEQERR endpoint not in FORMS mode 9H DNSPEC invalid endpoint name S1 DAMAGED system error 1 WRONGITM invalid object form contents 1 WRONGSTA invalid data map contents 47 A2 37UJ Rev00 5 17 5 7 7 5 18 IOF Programmer s Manual CDATTR Attribute selection Purpose This routine causes an attribute to apply to the fields selected in the selection vector This routine cannot remove an attribute modification performed before a CALL CDRELS Syntax CALL CDATTR USING output CD alias selection vector attribute identifier enclosure level Parameters output CD alias Refer to CD description selection vector The selection vector This structure is output by MAINTAIN FORM formnameV The form name and occurrence number fields of the selection vector must identify the form occurrence to which the command applies The other fields of the selection vector must be loaded as follows space do not assign the attributes of the associated field S assign the attributes of the associated field C clear the contents of the field B both clear the contents of the field and assign the attributes as specified After execution the contents of the selection vector fields are unchanged attribute identifier The attribute to be applied to the fields selected
28. ELS USING output CD alias enclosure level Parameters output CD alias enclosure level Return Codes Normal 0 DONE Abnormal 9A BREAK AC ARGERR A0 SNDVIOL A1 SEQERR 97 OPTERR A9 DVIDFBID 9H DNSPEC Refer to CD description The enclosure level to be associated with the data This is a one character data item that may take these values 1 End of record Data is quarantined no message is sent to the terminal 2 End of quarantine The data relative to this command and all previously quarantined data are sent to the terminal The application keeps control 3 End of interaction The data relative to this command and all previously quarantined data are sent to the terminal Control is given to the terminal The default is 1 a break occurred unexpected parameter turn error endpoint not in FORMS mode invalid enclosure level device not supported invalid endpoint name 47 A2 37UJ Rev00 Forms Mode SDPI Interface 92 MSGOV expansion area overflow S1 DAMAGED system error S1 WRONGITM invalid object form contents S1 WRONGSTA invalid data map contents NOTE After calling CDRELS the released forms are still displayed Activation of a new form by CALL CDGET in OVERLAY or WINDOW mode could lead to unpredictable results 5 7 6 CDPURGE Purge input data Purpose This routine purges all pending input messages and gives control back to the application Syntax CALL CDPURG
29. EMENTS Data StU CU Sg i es Sano KAB AA ALA lt lt KNANG GDRECV Forms Form 24 442 424 4 20 CDRELS Release all forms CDPURGE Purge input 5 17 CDATTR Attribute tnnte ntn tente ttn netta tanetis 5 18 CDATTL Attribute list 2222222 22 22 5 20 CDFIDI Form identification 5 23 CDMECH Control function mechanism eese tnra A PROGRAMMING EXAMPLE 47 A2 37UJ Rev00 ix 6 1 6 2 6 3 IOF Programmer s Manual Miscellaneous Primitives aa H QUERY QUERY ON TERMINAL ccsssssssssssssssssssssssssnsessssssssssesessssnseeesssessseeseees H DCTNATTR DECLARE TERMINAL ATTRIBUTES eene GET TERMINAL ATTRIBUTES eere 47 A2 37UJ Rev00 Table of Contents Illustrations Figures 1 1 Terminals supported by 7 1 3 3 1 PEW Characters EBC
30. ES SL PIC 9 3 VALUE 1 02 SALES SC PIC 9 3 VALUE 1 SALESR 04 SALES FC PIC 99 04 SLASH PIC X 1 04 SALE TITLE PIC X 10 04 REP NAME PIC X 27 04 REP CODE PIC X 6 04 SALE LINES A 05 SALE LINES OCCURS 7 2 0 0 0 0 0 0 WWW CO CO SALESV SA FIL FIL FIL SA SA 47 A2 37UJ Rev00 0 0 0 0 0 ESV ER ER ES VO 5 04 SA 6 PRODUCT PIC X 6 6 PRODUCT CODE PIC X 4 6 QUANTITY PIC 9 6 PRICE PIC 999V9 6 TOTAL PIC 9999V 04 GRAND TOTAL PIC X VALU COMP PIC 9999999V9 2 1 VALUE 41 3 9 99 Dis PIC X 8 VALUE SA PIC 9 3 VALUE ZE ES ES FC V PIC X 04 SLASH V PIC X 04 SA E TIT E VPIC 04 REP NAME 04 REP CODE 04 SA X V PIC X V PIC X E LINES AV 0 5 SA E LINES V OCC 06 PRODUCT V 06 PRODUCT COD URS PIC pat X E V PIC X 06 QUANTITY V PIC X 06 PRICE V PIC X 06 TOTAL V PIC X 04 GRAND TOTAL V 5 27 5 28 IOF Programmer s Manual The program which is called DEMO is listed below IDI ENTIFICATION PROGRAM ID DEMO AUTHOR A N OTHER INSTALLATION BULL ENVIRONMENT DIVIS CENTE DIVISION CONFIGURATION SEC SOU RCE COMPUTER ION TION EVEL OBJECT COMPUTER D
31. Job Control and IOF Bull DPS 7000 Programmer s Manual Programmer s Manual GCOS 7 Software Subject Special instructions Software supported Date Bull S A CEDOC Atelier de reproduction 331 Avenue Patton BP 428 49005 ANGERS Cedex FRANCE 47 A2 37UJ Rev00 This manual describes the features of GCOS 7 which a programmer developing programs for interactive execution needs to know This manual replaces the document referenced 47 A2 05UJ Rev05 for all users of GCOS 7 Release V7 47 A2 05UF remains valid for users of GCOS 7 V6 GCOS 7 AP HPS EXMS Release V7 February 1995 Bull HN Information Systems Inc Publication Order Entry MA30 843 300 Concord Road Billerica MA 01821 U S A Copyright Bull S A 1995 Bull acknowledges the rights of proprietors of trademarks mentioned herein Suggestions and criticisms concerning the form content and presentation of this manual are invited A form is provided at the end of this manual for this purpose Bull disclaims the implied warranties of merchantability and fitness for a particular purpose and makes no express warranties except as may be stated in its written agreement with and for its customer In no event is Bull liable to anyone for any indirect special or consequential damages The information and specifications in this document are subject to change without notice Consult your Bull Marketing Representative for product or service
32. PEND OVERLAY WINDOW and ERASE In APPEND mode the user can specify where to mount the form on the screen relative to forms already mounted If a new form is activated all the forms below the form to which the new form is appended are implicitly released and the area occupied by these forms on the screen is cleared If a form is requested to be mounted at the top of the screen the whole screen is cleared Several occurrences of the same form can be mounted simultaneously on the screen In this case each occurrence is identified by an occurrence number that is specified in formnamel and formnameV structures In OVERLAY mode all the preceding forms are logically released but the screen is not cleared These forms become frozen and the new form is displayed on the screen without relocation The WINDOW mode is a mode in which each form defines a window on the screen The window consists of the smallest rectangle that may contain the form beginning in line 1 column 1 up to the maximum line and the maximum column The program specifies in the form identification structure the location of the window by giving the coordinates of its top left corner All the forms previously on the screen are frozen as in OVERLAY mode Then the contents of the window that will contain the form are erased The form is relocated so as to be placed in the window and it becomes the new active form The main characteristic of the WINDOW mode is that when the CDGET refe
33. R MOVE 1 TO ERROR INDICATOR MOVE ALL S TO SALE LINES V I TOTAL EXIT PREP SEND IF SALE LINES J SPACES OVE ALL SPACES TO SALE LINES V J ELSE MOVE ALL S TO SALE LINES V J END PREP SEND EXIT 5 30 47 A2 37UJ Rev00 6 Miscellaneous Primitives The following miscellaneous service primitives help the user to issue a query at the terminal or to obtain all information about the terminal from which the interactive program was activated 6 1 H_QUERY QUERY ON TERMINAL Purpose H_QUERY is used to re issue a query at the terminal until a string meaning yes or no in the current language is returned For this purpose it uses the system variables YES and NO Syntax SH QUERY i charn LENGTH i fb15 REPLY ov_charl Parameters i charn Specifies the text of the query LENGTH Specifies the length of the text which must be greater than 0 and less than 256 REPLY Specifies the area which will receive the translated reply 1 is yes 0 is no Return codes Normal DONE Abnormal ARGERR invalid argument length error INDERR system variable YES or NO is without a value 47 A2 37UJ Rev00 6 1 IOF Programmer s Manual 6 2 H_DCTNATTR DECLARE TERMINAL ATTRIBUTES Purpose DCTNATTR is used to declare the structure filled by the H TNATTR primitive Syntax SH DCTNATTR PREFIX 1 identifier16 ATTRIB 1 char 1 Parameters PREFIX Specifies a character string whi
34. U CODE QUANTITY E pi E UO a Se SE H HH de Sh de EO H OSE HE se Se SE OSE He db HEHEHE HE ROD HEH FHH EH THE HEH TE EH RAN GRAND TOTAL The corresponding form definition language is NF SLASH LINE IS 01 COL IS 02 SCREEN PIC IS X 1 UL NF SALE TITLE LINE IS 01 COL IS 37 SCREEN PIC IS X 10 UL NF REP NAME LINE IS 02 COL IS 29 SCREEN PIC IS X 27 UL NF REP CODE LINE IS 02 COL IS 64 SCREEN PIC IS X 6 UL DI ARRAY SALE LINES OCCURS 07 NF PRODUC INE IS 04 COL IS 03 SCREEN PIC IS X 6 NF PRODUCT CODE LINE IS 04 COL IS 18 SCREEN PIC IS X 4 DI NF QUANTITY LINE IS 04 COL IS 35 SCREEN PIC IS 9 3 DI NF PRICE LINE IS 04 COL IS 46 SCREEN PIC IS 279 99 NU NF TOTAL LINE IS 04 COL IS 59 SCREEN PIC IS 2229 99 PR UF LINE IS 04 COL IS 13 VALUE IS UF LINE IS 04 COL IS 27 VALUE IS
35. UT OUTPUT ENVIRONMENT DIVISION CONFIGURATION SECTION SOURCE COMPUTER LEVEL 64 OBJECT COMPUTER LEVEL 64 INPUT OUTPUT SECTION FILE CONTROL SELECT INF ASSIGN INFILE ORGANIZATION SEQUENTIAL SELECT OUTF ASSIGN OUTFILE ORGANIZATION SEQUENTIAL DATA DIVISION FILE SECTION FD INF ABEL RECORD STANDARD 01 X 75 ABEL RECORD STANDARD 01 OUTF REC PIC X 75 PROCEDURE DIVISION START HERE EN INPUT INF OUTPUT OUTF MOVE SPACES TO INF REC READ INF AT END CLOSE INF CLOSE OUTF STOP RUN MOVE INF REC TO OUTF REC WRITE OUTF REC GO TO ITER 47 A2 37UJ Rev00 5 Forms Mode SDPI Interface 5 1 FORM GENERATION Forms are generated by the MAINTAIN FORM utility In EDIT mode the form is described routine by routine in the SDPI form definition language SDPI is short for Standard Device Programmatic Interface In FORMS mode the form is described pictorially using the full screen terminals which support this mode in conjunction with the form definition language For each form MAINTAIN FORM generates these members A reference source member in a binary library BINLIB MAINTAIN FORM names this member
36. am can nevertheless override this control by forcing a WRITE to the terminal with the FORCEWRITE option n general TAM will trigger an information transfer in these cases e FORCEWRITE an option of the H TN primitive e WRITE PUT new page e READ GET e switching to another mode e g to Forms mode e time out e screen full e buffer overflow Prefixing and Prompting In addition to quarantining prefixes and prompts can be used to associate particular ifns with information generated chronologically on the screen Output Messages output on the screen may be prefixed This prefix is a string chosen by the programmer of between 1 and 12 characters By default the prefix is 3 spaces The programmer can also have data output without a prefix Input Here the situation is slightly different A prompt unique to a particular ifn can appear on the screen when input for that ifn is required Three prompt possibilities are provided e normal prompt the prompt is limited to 12 characters specified either statically H_FD or dynamically H_TN The default prompt is the ifn concatenated with a colon anda space e temporary prompt the prompt is limited to the record size and must be specified through an H_TN primitive Its effect is on the next H_GET operation no prompt where the terminal is just as in input mode 47 A2 37UJ Rev00 Terminal Access Method 4 3 OUTPUT An output file can be handled
37. and a semicolon The default EOF is the end of sequence EOS No other character can be entered on the line containing the EOF 47 A2 37UJ Rev00 RECSIZE BLKSIZE DATAFORM REFMODE 47 A2 37UJ Rev00 Terminal Access Method The maximum record length It is limited to 264 characters prompt length and any expanded tabulation characters included For a TN file RECSIZE must be given Note that the default is 0 and that a label cannot update this value Specifies the size of the block The size must be at least equal to the size of the maximum record length This parameter is not used by TAM but the FD mechanism requires it when the RECSIZE parameter is specified otherwise a warning may occur at MACPROC time Specifies the format of the data records Standard Access Data Format Data only with no header SARF is the default format SSF System Standard Format Data records and record header and control records SSF can be used to present data as on a line printer with headings footings line numbering margins line spaces etc Reference mode either MOVE or LOCATE See the GPL System Primitives Reference Manual The default is MOVE mode REFMODE can be modified by the reference mode option of H OPEN primitive LOCATE mode is possible only with Input processing mode PMD parameter of the H OPEN primitive 4 6 2 4 12 IOF Programmer s Manual H OPEN Open File Purpose H OPEN is used to ini
38. availability MANUAL OBJECTIVES Preface This manual describes those features of GCOS 7 with which a programmer developing programs for interactive execution must be familiar INTENDED READERS The intended readers of this manual are programmers who wish to create and or maintain programs that execute interactively under IOF Interactive Operation Facility A general knowledge of GCOS 7 such as be obtained by reading Part 1 of the Terminal User s Reference Manual is assumed as well as familiarity with COBOL FORTRAN C or GPL STRUCTURE OF THIS MANUAL Section 1 Section 2 Section 3 Section 4 Section 5 Section 6 47 A2 37UJ Rev00 introduces the concepts associated with executing programs interactively under IOF describes Line mode and Forms mode the two modes in which a terminal can be accessed describes character sets the values of which are used to code characters transmitted from or to a terminal discusses the TAM Terminal Access Method discusses the SDPI Standard Device Programmatic Interface describes a few miscellaneous service primitives IOF Programmer s Manual NOTE Earlier versions of this manual included a section on the FORMS facility This information is now contained in the GCOS 7 Forms User s Guide Earlier versions of this manual also included sections on GCL translation services provided by GCL to interactive programs GCL command management and the crea
39. ch is prefixed to the name of the structure and to the name of each elementary item The default value is H ATTRIB specifies the attributes of the structure There are no default attributes Comments This primitive returns all the information about the terminal from which the interactive program was launched The information is valid only if IOF 01 X The LINE LENGTH and PAGE LENGTH parameters reflect the logical lengths as defined by the corresponding system variables They may be less than or equal to the actual terminal lengths 6 2 47 A2 37UJ Rev00 Miscellaneous Primitives The macro statement H_DCTNATTR generates this structure SH_DCTNATTR TNATTR ODEL VTYPE DISPLAY KEYBRD E LENGTH N GE LENGTH V FLAGS 2 H DVFEATR 3 SUB 3 H WRAPAROUND 3 3 ROLLUP H AUTOLF 3 H LINFOLD 3 x 3 H HTAB 3 H VTAB 2 47 A2 37UJ Rev00 V BIT 8 BIT 16 BIT 1 BIT 1 BIT 6 LOGBIN 8 LOGBIN 8 BIT 1 BIT 1 BIT 30 CHAR 12 BIT 2 BIT 1 BIT 1 BIT 2 BIT 1 BIT 1 BIT 6 BIT 1 BIT 1 CHAR 8 00 Batch 01 Model Nb CRT Terminal IOF Keyboard exists Terminal line length Terminal page May be used in formatted mode Automatic line after input Automatic line folding length feed
40. cilities such as command prompting Help text invocation and error recovery mechanisms without any special programming effort The GCL interface is available in both line and forms mode Thus no specific restrictions apply to the characteristics of the user s terminal for the use of this interface This interface is discussed in the GCL Programmer s Manual 1 6 2 1 MAINTAIN COMMAND PROCESSOR The command management processor MAINTAIN COMMAND handles the creation modification and compilation of GCL commands written at your installation This processor is discussed in the GCL Programmer s Manual The creation and maintenance of Help texts associated with GCL commands and their parameters is discussed in the GCL Programmer s Manual 47 A2 37UJ Rev00 1 5 1 6 2 2 1 6 IOF Programmer s Manual SERVICES The GCL interface provides various services which the IOF programmer can use to facilitate his task These include the following e calling up Help texts from within an IOF program e reading and or setting system and global variables to test and or modify the operating environment e analyzing file and fileset literals input from the terminal You can define your own GCL commands and have them compiled to be used in your programs see the GCL Programmer s Manual You can tailor a procedure to suit your own personal needs exactly You can also compress a series of existing procedures and their parameter values into a single
41. d VIP8800 e the value of the CSET system variable The default is 1 for PLW but see below This variable is an element of the user profile Its value may be set either from within the program using MODVAR which is described in the GCL Programmer s Manual or by the terminal operator using the MODIFY_PROFILE directive The normal combinations are the following e CSET 0 C101 for an application program which deals only with the C101 character set In this case presentation control will prevent the terminal operator from entering invalid characters even if his terminal supports PLW e CSET 1 PLW with an application program that uses the extended character set even if the user s terminal does not support PLW The table shows how PLW characters that do not belong to the C101 common subset are dealt with under various conditions C101 mode PLW mode PLE mode CSET 0 CSET 1 CSET 7 VIP8800 other terminals do not terminals support terminals support PLW or PLE PLW or PLE translated from interchange coding to direct EBCDIC not possible character not on keyboard rejected rejected translated from folded i e direct EBCDIC to interchange coding replaced by the invalid translated from character PLW EBCDIC In addition the special character sets can be selected by using the following values for CSET CSET 2 CSET 3 CSET 4 CSET 25 CSET 6 CSET 7 APL
42. de The get input is then concatenated with the temporary prompt In transparent mode if NPROMPT parameter in H_FD primitive and if PROMPT parameter is not used in previous H_TN primitive the terminal is just turned to input mode without any visible notification H_PUT Put Record Purpose H_PUT is used to display a logical record This command may be executed only in OUTPUT and APPEND processing modes Syntax SH_PUT ifn WA iv_location LENGTH i_fb15 47 A2 37UJ Rev00 Terminal Access Method Parameters ifn WA LENGTH Constraints Specifies the internal file name The user work area from which the record is to be moved The length in bytes of the next variable length record to be displayed If the records are of fixed length it is the length of the given string This string may be extended with blanks to reach record size The default length is record size The writing of the record may be deferred by TAM but any H_GET primitive for a file that is assigned to the same terminal or a H_TN with the FORCEWRITE option forces the display of all unprocessed records 4 6 5 H CLOSE Close File Purpose H CLOSE is used to close a file Syntax SH CLOSE ifn DEASSIGN 1 Parameters ifn DEASSIGN 47 A2 37UJ Rev00 Specifies the name of the file The file is to be deassigned immediately without waiting until the end of the step The file cannot be reopened before it i
43. ds of the selection vector must match a form and occurrence number for which data is available For each field in which a value is to be received from the terminal the corresponding selection vector field must be loaded with S Such a selection vector field will be modified by the command as follows R valid data has been moved to the corresponding field S no data available for the field i e either the field is not a transmittable field or its contents are set to null or to spaces and the RECEIVE SPACES option was not selected for the form C this field contains the cursor may also be returned for a non selected field X this field contains the cursor and valid data has been moved to it R C D this field has the attribute DT or IT and data are received in the field a sign was entered in an unsigned field no data transferred T least significant digits have been truncated data transferred O significant digits would have been truncated no data A transferred incorrect characters input to the field no data transferred O T and may be returned only for numeric or numeric edited fields that is fields with a numeric or numeric edited screen picture or with a computational usage e g COMP 1 fields All other selection vector fields must be loaded with spaces If some data is available for a non selected field the data is not transferred and the corresponding selection vector field is set to L lost
44. e If ERASE mode is specified that is if the field form name MD is set to E all the forms are released and the screen is cleared The form name SL and form name SC fields determine the line and column numbers 5 14 enclosure level IOF Programmer s Manual of the top left corner of the rectangle where the form is to be placed If a CDGET with OVERLAY is followed by one or more CDGETs with APPEND the subsequent forms will be appended to the overlaying form The formname LL field of the format structure gives the number of lines allocated to the new form If formname LL is zero the number of lines allocated is equal to the number of lines in the form If formname LL is not zero and is greater than or equal to the number of lines in the form the form is completed with the appropriate number of blank lines If formname LL is not zero and is less than the number of lines in the form the status FUNCNAV is returned This field is interpreted only for the new format structure that is the first FILLER must be set to 2 The maximum number of active or frozen forms is 6 The enclosure level to be associated with the data This is a one character data item that may take these values 1 End of record Data is quarantined no message is sent to the terminal 2 End of quarantine The data relative to this command and all previously quarantined data are sent to the terminal The application keeps control 3 End of inte
45. erence Manual is a prerequisite to this manual because it gives an overview of IOF facilities Under IOF the terminal user is provided with menus prompts and help texts to explain each domain command and parameter You can dialog with the system in full screen mode when using a terminal which supports forms You are provided with a specific profile which allows you to define your own working mode and resource requirements The programmer creating interactive applications to run under IOF is expected to provide end users terminal operators of the applications with the same level of facilities INTERACTIVE PROGRAM CONTEXT All the GCOS 7 tools useful to the programmer can be activated interactively These tools include library maintenance editors both the line editor and the full screen editor compilers the linker and the debugger These facilities are described in the OF Terminal User s Reference Manual and in the manual s specific to each product Working environments may be made available by the System Administrator Standard environments for IOF and batch programming are provided with GCOS 7 as described in the GCOS 7 System Administrator s Manual The following commercial programming languages are available COBOL FORTRAN PASCAL C and GPL The compilers for these languages are available both under IOF and in batch IQS is discussed in its own manual set and is not treated here INTERACTIVE PROGRAM SPECIFICS The
46. es Reference 47 A2 64UL 47 A2 37UJ Rev00 NOTATION CONVENTIONS Preface The following notation is used in the formats of the commands presented in this manual ITEM item item item1 item2 item3 item2 item3 47 A2 37UJ Rev00 Uppercase characters are used for keyword items that are to be entered exactly as shown Lowercase characters are used for user supplied items An item within square brackets is optional A column of items within braces means one item must be selected The default if there is one is underlined e g item3 here A sequence of items separated by vertical bars has the same meaning as the convention just above An ellipsis indicates that the preceding item may be repeated one or more times vi IOF Programmer s Manual 47 A2 37UJ Rev00 Table of Contents 1 INTFOGUCTION PAA 1 1 1 1 IOF AND BATCH 1 1 1 2 INTERACTIVE OPERATOR 1 1 1 3 INTERACTIVE PROGRAM 1 2 1 4 INTERACTIVE PROGRAM 1 2 1 5 TERMINAES aaa 1 3 1 6 USING THE TERMINAL isssisesienicarniteriaiqciaanitcindnntvinnscaniemacienniinetwin 1 6 1 Ea a PAA 1 4 LINE MODE ETE 1 6 1 2 FORMS NODE 1 6 13 MAINTAINEFORM PROCESSOR saaan kaan 1 6 2
47. est to the IOF applications programmer concern dialog with the terminal A large number of primitives and commands are available to assist in programming under IOF These are described in detail later in this manual there is a presentation of each primitive in terms of its function format parameters return codes restrictions if any and examples of use Various levels of communication with the terminal are available as discussed below Basic Level The basic level enables the program to exchange information with the terminal for most general purposes At this level two modes are provided line or text mode and forms mode LINE MODE In line mode text is input or output in continuous streams this mode is designed for Source text processing You might use this mode for entering a source program written in COBOL PASCAL C GPL or FORTRAN or for entering text such as the contents of this manual In this mode the interface between the terminal and the rest of the system and processors is the Terminal Access Method TAM which gives access to the terminal as if it were a conventional file The TAM interface is discussed in Section 4 of this manual FORMS MODE In forms mode the terminal screen is composed of one or more fixed parts the forms that contain variable fields to be filled in by the user or user program This mode can be used for commercial formats and is particularly good for graphically presenting information
48. he characters of the PLW direct code If the terminal concerned supports PLW then it is assumed to be operating in this mode and the characters are displayed in PLW code If the terminal concerned does not support PLW then any PLW characters that do not belong to the C101 common subset are folded In folding each accented letter is replaced by its equivalent non accented letter The purpose of folding is to avoid sending invalid characters which is the alternative to folding However folding does not guarantee that the resulting text is intelligible in all cases When a form of type PLW is activated by means of a CDGET primitive and the program concerned operates in PLW mode PLW characters in the object form are displayed in PLW code if the terminal supports PLW or are folded into C101 characters if the terminal does not support PLW When a form of PLW type is moved to a diskette by MAINTAIN FORM folding is performed systematically 47 A2 37UJ Rev00 4 Terminal Access Method 4 1 HOW IT WORKS TAM is an access method designed to support an interactive program and yet remain consistent with classical GCOS access methods TAM is designed as a data management interface to handle the exchanges between an interactive program and a terminal This compatibility of interactive and file contexts has these features ea program accessing a sequential through the COBOL verbs OPEN READ WRITE CLOSE is executable at an IOF terminal
49. icated by the selection vector that is a logical terminal as seen by the program Syntax CALL CDSEND USING output CD alias data record enclosure level selection vector 47 A2 37UJ Rev00 Parameters output CD alias data record enclosure level selection vector 47 A2 37UJ Rev00 Forms Mode SDPI Interface Refer to the CD description The data record associated with the form This structure is output by MAINTAIN FORM formnameR The enclosure level to be associated with the data This is a one character data item that may take these values 1 End of record Data is quarantined no message is sent to the terminal 2 End of quarantine The data relative to this command and all previously quarantined data are sent to the terminal The application keeps control 3 End of interaction The data relative to this command and all previously quarantined data are sent to the terminal Control is given to the terminal The selection vector This structure is output by MAINTAIN FORM formnameV The occurrence number field of the selection vector must identify the form occurrence to which the command applies The other fields of the selection vector must be loaded as follows space do not move the associated data field from the data record S move the associated data field from the data record C clear the contents of the field After execution the contents of the selection vec
50. itive H_OPEN primitive H_PUT primitive H_QUERY primitive H_TN primitive H_TNATTR primitive Help texts IOF Programmer s Manual inputs quarantining 4 2 actions edited mode 4 6 transparent mode 4 6 S SDPI Standard Device Programmatic L Interface COBOL statements languages programming 1 2 sharing a terminal with TAM line mode 1 412 1 services M T MAINTAIN_COMMAND 1 5 TAM Terminal Access Method 1 4 2 2 MAINTAIN FORM 1 51 5 1 primitives manuals iV sharing a terminal with SDPI terminals supported by GCOS 7 text mode 1 N tools programming traces FORMS transparent mode 4 notation WINDOW mode 5 3 operator context 1 1 outputs actions edited mode transparent mode OVERLAY mode PLE Pluri Lingual East 3 1 3 4 PLW Pluri Lingual West 3 1 PLW character set 1 3 POPUP mechanism 5 3 prefixes primitives GPL TAM 4 9 program specifics programming languages programming tools prompts normal temporary Ad i 2 47 A2 37UJ Rev00
51. l as coding the tabulation character for a particular ifn Later on IOF will perform the expansion of the subsequent data records according to the CR131 of that ifn Note that the record length after expansion should not exceed the RECSIZE value The expansion of tabulations takes place before line folding processing 47 A2 37UJ Rev00 Terminal Access Method Files and Output Presentation Obviously the presentation will be correct if only one ifn is used and if asynchronous messages are held during the display of output Therefore two typical uses of TAM are one ifn in OUTPUT and another in INPUT are used to establish a dialog The ifn for INPUT is used without any sophisticated presentation requirements e one ifn active for OUTPUT is used to provide a report with a neat presentation i e headings footings margin etc Any other situation with several ifns in OUTPUT at the same time or one in INPUT and another in OUTPUT and requiring a neat presentation in OUTPUT will give a rather unsatisfactory result due to the trade offs that have to be made to support those contradictory requirements Such as heading footing intermixing or an automatic new page jump after an input 4 3 2 Transparent Mode Any binary sequence may be submitted by the program by specifying through a H_TN primitive that the next primitive will be in transparent mode Any control record is then ignored so there is no processing of tabulations line folding
52. nd receiving information alternately The two access methods will be presented in Sections 4 and 5 of this manual after further details on Line and Forms modes below 47 A2 37UJ Rev00 2 1 2 2 2 3 2 2 IOF Programmer s Manual LINE MODE TAM is the interface handling the link between the terminal in Line mode and the program These aspects should be noted TAM is fully compatible with other data management interfaces Hence data may be directed to or from the terminal or a file simply by assigning an internal file name to the terminal as you would do for a conventional file e Both SARF and SSF file formats are available As regards output the terminal is seen as the equivalent of a printer so that for example some of the features of the SYSOUT access method are available to the terminal By using different internal file names a logical separation can be made between the input and output of a program TAM is accessible through COBOL FORTRAN PASCAL C and GPL FORMS MODE SDPI is the interface handling the terminal in Forms mode The terminal itself must have the necessary features for the depiction of forms for example reverse video or high low intensity differentiation or the more advanced features of color The GCOS 7 Forms User s Guide contains a full list of terminals which can support Forms mode SDPI is accessible through COBOL C and GPL The SDPI interface is common to both TDS and IOF enviro
53. new features specific to programming under IOF are designed to facilitate the interaction between a program and its user s during the execution of the program The main difference between an interactive program and a batch program is that the former interacts with a user terminal operator during its execution Thus the specific needs of an IOF application programmer are for facilities which handle a dialog with a terminal at different levels and in various modes The object of this manual is to present these facilities 47 A2 37UJ Rev00 Introduction 1 5 TERMINALS The modes in which a program can dialog with a terminal operator depend on the characteristics of the terminal A list of the terminals supported by GCOS 7 is presented in Table 1 1 below Terminals which support Forms Mode that is permit a dialog in full screen mode are marked with an in the table Terminals which support the PLW character set described in Section 3 are indicated with a in the table VIP BSC synchronous 3270 DKU7001 2 DKU7005 3270 MINITEL DKU7007 IBM3741 PC7800 DKU7105 3278 PRT1220 DKU7107 IBM3279 TTU8124 DKU7211 TTU8126 PDP11 10 TTU8128 TTU8221 TTY33 VIP7804 TTY35 VIP8800 TWS2255 VIP7801 Figure 1 1 Terminals supported by GCOS 7 47 A2 37UJ Rev00 1 3 1 6 1 6 1 1 6 1 1 1 6 1 2 1 4 IOF Programmer s Manual USING THE TERMINAL As explained above the specific features which are of inter
54. nments 47 A2 37UJ Rev00 Line Mode and Forms Mode 2 4 SHARING THE TERMINAL BETWEEN AND SDPI A terminal may be shared between TAM and SDPI From the program s point of view each interface has a different visibility each managing an independent virtual terminal At any one moment there is only one virtual terminal mapped onto the actual terminal The system also keeps an image of the contents and attributes of the variable fields of a Form used on the terminal and this information can be restored when passing back into Forms mode So for example if a programmer in forms mode passes into Line mode and then back into Forms mode the previous information relative to Forms mode has been stored by the system and is restored From the point of view of the terminal when a switching between logical terminals occurs while a form is being displayed these events take place e a synchronization message is issued if necessary the characters are displayed at the bottom of the screen e the image on the screen is saved e the screen is cleared e the statement is executed When an SDPI primitive is subsequently issued e the stored form is displayed on the screen Variable fields are restored to their previous values and attributes e the statement is executed 47 A2 37UJ Rev00 2 3 2 4 IOF Programmer s Manual 47 A2 37UJ Rev00 3 Character Sets 3 1 EXTENDED CHARACTER SETS The values used to code character
55. nnot be displayed on the screen The default is e HOF Head Of Form specifies the line number of the first line on the screen to be used The default is HOF 1 e FF1 first level of Full Form specifies the last line on the screen to be used FF2 second level of Full Form specifies the line at which a return code message will be produced These restriction applies 1 lt lt FF2 lt FF1 The defaults are FF1 FF2 PL Line Folding Depending on the format TAM does the following e in SARF format the line folding is automatic e in SSF format truncation can be requested by a control record but folding is generally specified through the system variable PW Folding is performed by splitting the record after the page width specified by PW This width must not exceed the physical printing width of the terminal Note that if the programmer wants to control the folding of an output text at a given point he must generate two separate records The data part of the records is supposed not to contain any backspace character as far as folding is concerned Tabulation Tabulation stops can be set at the terminal in order to speed up the display of output and will be inserted automatically by TAM just before the physical output to the terminal Usually the output data does not contain any embedded tabulation characters However a Control Record CR 131 can be used to specify the values of tabulation stops for expansion as wel
56. of all active forms This command is effective on the next CDGET clear unprotected fields and reset attributes to their initial value When the screen is in normal mode i e after CDRELS LEVEL 1 this command clears the screen resets all forms to their initial state are valid only if the endpoint is a forms mode printer otherwise they have no effect If the STPRV mechanism is set then for all subsequent CDSEND commands only the variable fields are printed If the STPRA mechanism is set then for all subsequent CDSEND commands all fields are printed STPRA is the default mode sets up a mode where the user will be notified of the cursor position in the subsequent CDREV statements for terminals that support this feature QUESTAR 200 IBM3278 3279 MINITEL resets a previously CPON mechanism When the active form has been activated in window mode this mechanism causes this form to be released and the previous form in the stack of displayed forms to become active The window associated with the released form is reset to the underlying contents When the active form has not been activated in WINDOW mode or when the stack of displayed forms is reduced to one form a return code FUNCNAV is sent 47 A2 37UJ Rev00 enclosure level Return Codes Normal 0 DONE Abnormal 9A BREAK AC ARGERR AO SNDVIOL 97 OPTERR A6 OBJUNKN A9 DVIDFBID 9H DNSPEC S1 WRONGITM S1 WRONGSTA AE FUNCNAV 47 A2
57. osure level to be associated with the data This is a one character data item that may take these values 1 End of record Data is quarantined no message is sent to the terminal 2 End of quarantine The data relative to this command and all previously quarantined data are sent to the terminal The application keeps control 3 End of interaction The data relative to this command and all previously quarantined data are sent to the terminal Control is given to the terminal The default is 1 Return Codes Normal 0 DONE AF DONEIDE Abnormal 9A BREAK AC ARGERR AO SNDVIOL A7 SNDARERR A1 SEQERR 97 OPTERR A6 OBJUNKN AG NOMATCH A9 DVIDFBID 9H DNSPEC or CONFLICT 92 MSGOV S1 DAMAGED S1 WRONGITM S1 WRONGSTA IOF Programmer s Manual invalid selection vector contents a break occurred unexpected parameter turn error the selection vector does not match an active form endpoint not in FORMS mode invalid enclosure level unknown attribute the creation date of the form does not match the creation date of program structures device not supported invalid endpoint name the attribute conflicts with the form e g because the selected field starts in column 1 expansion area overflow system error invalid object form contents invalid data map contents CDATTL Attribute list selection Purpose This routine causes a list of attributes to apply to the fields selected in
58. raction The data relative to this command and all previously quarantined data are sent to the terminal Control is given to the terminal The default is 1 47 A2 37UJ Rev00 Return Codes Normal 0 DONE Abnormal 9A BREAK 9J ALREADY AC ARGERR AO SNDVIOL A4 RECNFD AE FUNCNAV 97 OPTERR 92 ENTRYOV or MSGOV or SPACEOV A9 DVIDFBID AG NOMATCH 9H DNSPEC 9F CALLVIOL S1 DAMAGED S1 WRONGITM S1 WRONGSTA 47 A2 37UJ Rev00 Forms Mode SDPI Interface a break occurred form already active last form activated in WINDOW mode unexpected parameter turn error the specified form was not found activation mode not available invalid enclosure level Maximum number of active or frozen forms exceeded expansion area overflow no more space available for control structures device not supported the creation date of the form does not match the creation date of program structures invalid endpoint name environment is neither TDS nor IOF system error invalid object form contents invalid data map contents 5 7 5 5 16 Purpose IOF Programmer s Manual CDRELS Release all forms This routine releases all active forms and puts the terminal in line mode The screen is not cleared This routine also releases all attribute modifications into the forms management structure No attribute modification can be removed by another CALL after this routine has been performed Syntax CALL CDR
59. re presented schematically and in detail below The File Management primitives which are not described here in this section also apply to the TAM e g H CRFD H DLFD H_ASSIGN H_DEASSIGN NOTE f a break occurs while a TAM file is open a BREAK Return Code is returned with a subsequent primitive Apart from the case of break the return codes are the normal access method return codes 4 6 1 File Declaration Purpose H_FD is used to declare characteristics of a file These can be updated by the ASGi or DEFi parameters of the EXEC_PG GCL command or dynamically when the file is open with the H_TN primitive Syntax SH FD ifn ACTUAL EMPTY ATTRIB 1 char PROMPT 1 12 NMSG EOF l_char4 NPROMPT RECSIZE 1 digit5 BLKSIZE l_digit5 DATAFORM SARF SSF 1 REFMODE MOVE LOCATE 47 A2 37UJ Rev00 4 9 Parameters ifn ACTUAL EMPTY ATTRIB TN PROMPT NPROMPT NMSG EOF 4 10 IOF Programmer s Manual The internal file name i char8 is the name of a terminal file in a program or in GCL This name must be unique within a compile unit and within a linked group of compile units Allocation has to be made for this file declaration with initialization taking the user provided parameters or system defaults No allocation is to be made for this file declaration
60. rences a form which is already displayed in a window this form becomes the active form again with its fields restored to their contents when the form was the active form In this case the form is always displayed at the same location on the screen and the window coordinates that may be specified are ignored This gives a visibility similar to a stack of sheets of paper that partially overlay each other and where the user may remove a sheet in the middle of the stack to put it on the top of the stack Also the POPUP mechanism may be used to release only the currently active form In this case the form window is reset to its underlaying contents and the next form in the stack becomes the new active form The ERASE mode is similar to the WINDOW mode with the difference that it first releases all forms and clears the screen A form may be activated in WINDOW mode only if the previous form was activated in one of these modes ERASE WINDOW A form cannot be appended to a form activated in WINDOW or ERASE mode 47 A2 37UJ Rev00 5 3 5 4 IOF Programmer s Manual The object form may be mounted either from the binary libraries of the step or from the terminal diskette This choice is transparent to the program which always issues the same routine The forms runtime package either sends the object form or requests the terminal to mount the form from the diskette depending on the form generation options NOTES 1 The TERM ANY option is mandator
61. s carriage return line feed form feed Any such character is translated into the current substitution character This character is defined by the system variable INVCHAR the default is IOF counts the number of lines sent from the program to the terminal and divides this output into a series of screens or pages The length of each screen is determined in the user profile MP command by the system variables PL Page Length and PW Page Width A prompt appears on the bottom of the screen and waits for the user to press the TRANSMIT key to display the next screen Organization of output into screens is known as PAGEMODE is standard for non scrolling terminals Scrolling terminals however may use this mode by assigning a system variable PAGEMODE 1 The four system variables concerned with output INVCHAR PL PW and PAGEMODE are described in the GCL Programmer s Manual Assigning these variables in the user s profile is discussed in the same manual 47 A2 37UJ Rev00 4 3 4 4 IOF Programmer s Manual Printer like Presentation By using the appropriate control records SSF edited mode can be used to present data on the screen as on a line printer i e with headings footings line numbering etc A programmer can specify these characteristics e the system variable PL Page Length specifies the form height e the system variable INVCHAR specifies the alternative presentation of characters that ca
62. s reassigned IOF Programmer s Manual 4 6 6 File declaration Purpose H TN is used to dynamically redefine certain TAM options This primitive is effective only when the file is open If executed on a closed file H TN provokes an abnormal return code Syntax H TN ifn i charl PROMPT i_charl2 LENGTH fb15 MODE T p TRSPRT MSG Y N i charl FORCEWRITE Parameters ifn Specifies the internal file name assigned to the terminal The file must currently be open PROMPT Specifies the user work area which contains the value of the new prompt LENGTH Specifies the length in bytes of the new prompt MODE Specifies that prompt switching is either Permanent or Temporary Permanent the prompt is switched for all subsequent H PUT H GET primitives The length of the prompt LENGTH must not exceed 12 characters Setting LENGTH to 0 means no prompt T Temporary the prompt will apply only to the next H GET primitive In this mode a prompt larger than 12 characters can be defined The prompt length LENGTH must not exceed RECSIZE TRSPRT The next H PUT primitive will be transparent i e data will be 4 16 sent to the terminal without alteration Note that when using TRSPRT you must provide all the presentation characters Presentation characters CRLF cursor position etc will be treated as one line by the presentation layer to avoid malfunction
63. s assignment DEFi parameter can extend the file description with define parameters ALCi parameter is not meaningful for the terminal since no allocation is made OUTi parameter is not meaningful since it only refers to a file to be written by the SYSOUT mechanism For a full description of the file parameter groups refer to the OF Terminal User s Reference Manual These data management options are the only options relevant to the TAM 451 ASGi File Assignment Parameters ASGi file description The most general file description is presented in the OF Terminal User s Manual For the terminal the file description is reduced to full path name md TN SUNCAT e TN the device class terminal refers to the main device of the terminal keyboard display or keyboard printer e md the media parameter used to specify the name of the media e the external file name is not relevant to the main device of the terminal The default value for the efn parameter is the ifn value 47 A2 37UJ Rev00 4 7 IOF Programmer s Manual 4 5 2 DEFi File Define Parameter Group This describes the file characteristics and the features particular to the TAM Significant parameters RECSIZE decb DATAFORM SARF SSF Terminal file specific parameters PROMPT char12 MSG MSSG bool EOF char4 4 8 47 A2 37UJ Rev00 Terminal Access Method 4 6 GPL PRIMITIVES All TAM primitives a
64. s input from or output to your terminal belong to one of the following sets C101 The standard EBCDIC character set C114 The Arabic character set C118 The Greek character set C113 The Cyrillic character set C094 The Chinese character set PLW The PLW Pluri Lingual West character set Figure 3 1 PLE The PLE Pluri Lingual East character set PLW Pluri Lingual West is a character set which contains most of the characters used in those Western European languages which use the Latin alphabet The set includes the usual alphanumeric characters plus the accented characters This character set is presented in Figure 3 1 Note that Hatched codes are actually part of the character set but are not supported by DKU terminals or by VIP8800 family terminals e This figure does not show the terminal management characters for instance FW code 12 BS code 16 SYN code 32 These characters do not belong to the PLW character set 47 A2 37UJ Rev00 3 1 3 2 IOF Programmer s Manual Figure 3 1 PLW Characters EBCDIC 47 A2 37UJ Rev00 Characters Sets The way that TAM and SDPI handle PLW characters that do not belong to the C101 common subset depends on these two factors e whether or not the terminal supports PLW These terminals support PLW MINITEL DKU7105 DKU7107 DKU7211 PRT1220 TWS2255 an
65. the selection vector Attributes are evaluated sequentially hence the effect of one attribute may be cancelled by the following attributes in the list 47 A2 37UJ Rev00 Syntax Forms Mode SDPI Interface CALL CDATTL USING output CD alias selection vector attribut Parameters output CD alias selection vector attribute identifier enclosure level 47 A2 37UJ Rev00 identifier enclosure level Refer to CD description This structure is output by MAINTAIN FORM formnamev The form name and occurrence number fields of the selection vector must identify the form occurrence to which the command applies The other fields of the selection vector must be loaded as follows space do not assign the attributes of the associated field S assign the attributes of the associated field C clear the contents of the field B both clear the contents of the field and assign the attributes as specified After execution the contents of the selection vector fields are unchanged A structure with this description 01 data namel 02 data name2 PIC 9 3 VALUE n 02 data name3 PIC X 4 OC CURS n where data name2 is the number of attributes to be applied coded in decimal and each element of data name3 is an attribute identifier The list of attribute identifiers and their interpretations are detailed in the description of CDATTR command The enclosure level to be associated with the data This is a one
66. tialize the processing of a file and must be issued before any other imperative can be used on file If a file is to be processed further after an H CLOSE has been issued an H OPEN must be reissued Syntax SH OPEN ifn PMD INPUT OUTPUT APPEND iv char 2 REFMODE i char 1 Parameters ifn Specifies the name of the file to be opened PMD Specifies the processing mode as follows INPUT makes the file accessible to H GET OUTPUT makes the file accessible to H PUT APPEND makes the file accessible to H PUT iv char 2 allows the user to dynamically change the processing mode The variable declared as CHAR 2 stands for one of three possible abbreviations IN OU or AP REFMODE Specifies the reference mode Options are For MOVE mode REFMODE M For LOCATE mode REFMODE L 47 A2 37UJ Rev00 Terminal Access Method 4 6 3 Get Record Purpose H_GET specifies the location and length of a record to be retrieved from a terminal file It can be executed only in INPUT mode Syntax SH GET ifn WA ov location ov ptr OUTLEN ov fb15 MAXLEN i fb15 Parameters ifn Specifies the name of the terminal file WA Work area Specifies the location of the record as follows In MOVE mode it is the area into which data received from the terminal is stored ov_location n LOCATE mode it is a pointer to the record in the buffer
67. tion and modification of Help texts This information is now contained in the GCL Programmer s Manual ASSOCIATED DOCUMENTS The following manuals are companion documents GCOS Forms Users Guide rit Phe oit 47 A2 15UJ GCL Programmer s Manual 47 A2 36UJ The following manual is prerequisite reading to understand the material presented in this manual IOF Terminal User s Reference Manual Part 1 47 A2 380 The following manuals are also recommended IOF Terminal User s Reference Manual Part 2 47 A2 S9UJ IOF Terminal User s Reference Manual Part 3 47 A2 40UJ GCOS 7 System Administrator s Manual sse 47 A2 4105 GCOS 7 Forms User s Guide ssi sisse nennt nnne 47 A2 15UJ The following manuals should be consulted as needed COBOL 85 Reference Manual essere nnns 47 A2 05UL COBOL 85 Users GUld8 iei i iiie die hae detis hada eed a due oae vaa 47 A2 06UL FORTRAN 77 Reference Manual essere 47 A2 15UL FORTRAN 77 User Guide caede eode AA eR dee ou 47 A2 16UL GPL Reference Manual essit nnns 47 A2 35UL GPL User GUE RD 47 A2 36UL GPL System Primitives Reference Manual seen 47 A2 34UL C Language User s Guide 47 A2 60UL C Language System Primitiv
68. tor fields are unchanged except in case of a selected numeric field with invalid contents where the selection vector field is loaded with 5 9 Return Codes Normal 0 DONE AB ALMOST AF DONEIDE Abnormal 9A BREAK AC ARGERR A0 SNDVIOL A7 SNDARERR A1 SEQERR 97 OPTERR AG NOMATCH A9 DVIDFBID 9H DNSPEC S1 DAMAGED S1 WRONGITM S1 WRONGSTA IOF Programmer s Manual an error was found in at least one field invalid selection vector contents a break occurred unexpected parameter turn error the selection vector does not match an active form endpoint not in FORMS mode invalid enclosure level the creation date of the form does not match the creation date of program structures device not supported invalid endpoint name system error invalid object form contents invalid data map contents CDRECV Forms Receive Purpose This routine causes data to be received in the data record according to the selection vector Syntax CALL CDRECV USING input CD alias data record wait indicator selection vector 47 A2 37UJ Rev00 Parameters input CD alias data record selection vector wait indicator 47 A2 37UJ Rev00 Forms Mode SDPI Interface Refer to CD description The data record associated with the form This structure is output by MAINTAIN FORM formnameR This structure is output by MAINTAIN FORM formnamev The form name and occurrence number fiel
69. without further modification e conversely a program written for an interactive context can use the file verbs OPEN READ WRITE CLOSE In addition the GPL H TN primitive permits the user to dynamically redefine several options of the TAM Note however that in a file context the H TN primitive is refused with the FUNCNAV return code i e function not available Further details on these primitives are given below e an internal file name ifn is assigned to an IOF terminal by specifying TN as the device class in the ASGi file assignment parameter group of the EXEC PG command The user may assign several ifns to the same terminal A program needs at least two ifns for interactive dialog one for input and one for output The ifn is the means by which a program specifies terminal handling and presentation characteristics which are independent from those of other ifns These characteristics include data format default prompts etc There is however the problem that in using several ifns various outputs will arrive on the Screen in chronological order with all ifns mixed along with any other information sent to the terminal from other interfaces 47 A2 37UJ Rev00 4 1 4 2 4 2 1 4 2 2 4 2 IOF Programmer s Manual TWO IMPORTANT ASPECTS OF THIS INTERFACE Quarantining TAM can block successive WRITEs to ifns assigned to the same terminal in order to minimize the number of input output operations A user progr
70. wo traces are activated by using the option LOG MODIFY or LOG START FOR SYSTEM 47 A2 37UJ Rev00 5 7 5 7 1 Forms SDPI Interface SDPI COBOL STATEMENTS This section describes the FORMS mode routines accessible via COBOL statements For the C Language interface see the manual C Language System Primitives and for the GPL interface see GPL System Primitives Some parameters are passed to the input or output CD structure Since the CD cannot be directly used in a COBOL CALL routine it must be redefined in the Communication section of an I O structure Such a redefinition is subsequently designated as a CD alias Data Structures The FORMS services accept several data structures as parameters The form identification the data record and the selection vector are generated by MAINTAIN_FORM and retrieved by COPY in the program The input and output Communication descriptions are standard COBOL communication structures The actual use of these structures by FORMS is detailed below The input and output Communication Description CD entries must be redefined in the Communication Section because the CD names cannot be used directly in the CALL verb s parameter list The redefinitions are CD cd name 1 FOR INPUT 01 cd alias 1 02 symbolic queue data nam PIC X 12 02 FILLER PIC X 36 a 02 date data name PIC X 6 02 time data name PIC X
71. xt message Syntax CALL CDFIDI USING input CD alias form identifier Parameters input CD alias Refer to CD description form identifier The name and occurrence of the form relative to the next message or portion of message to be received The format of this structure is as follows 01 form identification 02 form name PIC X 8 02 occurrence number PIC 9 3 Return Codes Normal 0 DONE Abnormal RCVVIOL turn error 9A BREAK a break occurred A9 DVIDFBID device not supported 9H DNSPEC invalid endpoint name S1 DAMAGED System error 1 WRONGITM invalid object form contents 1 WRONGSTA invalid data map contents 47 A2 37UJ Rev00 5 23 Purpose IOF Programmer s Manual 5 7 10 CDMECH Control function mechanism This statement activates a control function mechanism Note that it cannot remove an attribute modification performed before a CALL CDRELS Syntax CALL CDMECH USING output CD alias mechanism identifier enclosure level Parameters output CD alias mechanism identifier ALARM CLEAR PROTCT INITAT alias RESET INIT STPRA and STPRV CPON CPOFF POPUP Refer to CD description A mnemonic that represents a control function mechanism that is related to the device This is a 6 character alphanumeric data item that may take these values activate the audio or visual alarm if any clear all unprotected fields turn to protected all named fields
72. y for a form to be activated in WINDOW or ERASE mode See the GCOS7 Forms User s Guide 2 Activating a form within an lOF startup procedure is not recommended 47 A2 37UJ Rev00 5 4 5 5 Forms Mode SDPI Interface OUTPUT ACTIONS Several routines are available that display a message on the terminal e CDSEND is used to select variable fields of a form A selection vector is passed to identify the form and to specify the fields that must be modified e CDATTR is used to define a rendition attribute of fields of a form The form and its fields are identified by a selection vector e CDATTL is similar to CDATTR except that it sets a list of attributes instead of only one attribute e CDMECH is a control function that acts on the terminal clearing all unprotected fields or setting off the alarm e CDRELS releases all the active forms and sets the terminal to line mode This routine does not clear the screen If the screen is to be cleared this routine must be followed by a CDMECH with RESET option INPUT ACTIONS When the terminal user enters data on the screen his program must issue as many CDRECV routines as there are forms for which data is to be entered It is recommended that each CDRECV be preceded by a CDFIDI routine which returns the identification of the next form to receive data The program passes a selection vector to the CDRECV routine to identify this form and to select those fields of the form to receive data
Download Pdf Manuals
Related Search
Related Contents
HyDraw Library Manager 2015 User Manual Manual do usuário Samsung CLX-3305FW User's Manual Pop & Sing Apple Manual Edimax BR-6208AC Wi-Fi Ethernet LAN Dual-band Grey router ポータブル濁度計 TN100IR 日本語取扱説明書 Copyright © All rights reserved.
Failed to retrieve file