Tools and Utilities Library CROSSREF Manual ™ Abstract Part Number This manual describes the CROSSREF cross-referencing utility, including how to use it with C, COBOL 74, COBOL85, EXTENDED BASIC, FORTRAN, Pascal, SCREEN COBOL, and TAL programs, and how to interpret the output.
Document History Edition Part Number Product Version Operating System Version Date First Edition Second Edition Third Edition 82316 A00 82516 A00 82597 CROSSREF A00 CROSSREF B00 CROSSREF C00 GUARDIAN A04/E05 GUARDIAN B00/E08 GUARDIAN 90 C00 October 1982 March 1985 November 1987 New editions incorporate any updates issued since the previous edition. Copyright All rights reserved.
NEW AND CHANGED INFORMATION Sections describing how to use CROSSREF on C, COBOL85, and Pascal programs have been added to the CROSSREF Manual for the C00 release of the GUARDIAN Operating System.
CONTENTS PREFACE ...................................................... ix NOTATION CONVENTIONS ......................................... xi SECTION 1. INTRODUCTION .................................... What Is CROSSREF? ......................................... Which Languages Does CROSSREF Support? .................... How Does CROSSREF Work? ................................... Stand-Alone CROSSREF ...................................... Compiler-Dependent CROSSREF ...............................
CONTENTS LOG Command .............................................. OBEY Command ............................................. OUT Command .............................................. RESET Command ............................................ SAVE Command ............................................. SCAN Command ............................................. SET Command .............................................. SHOW Command ............................................. SYSTEM Command ...............
CONTENTS SECTION 9. FORTRAN ......................................... 9-1 FORTRAN Identifiers ....................................... 9-1 Sample Listing ............................................ 9-3 SECTION 10. PASCAL ........................................ 10-1 Pascal Identifiers ....................................... 10-1 Sample Listing ........................................... 10-2 SECTION 11. SCREEN COBOL .................................. 11-1 SCREEN COBOL Identifiers ..........................
CONTENTS 5-1. 5-2. 5-3. 6-1. 6-2. 6-3. 7-1. 7-2. 7-3. 8-1. 8-2. 8-3. 9-1. 9-2. 9-3. 10-1. 10-2. 10-3. 11-1. 11-2. 11-3. 12-1. 12-2. 12-3. C Sample Program ...................................... 5-3 CROSSREF Listing--File List ........................... 5-5 CROSSREF Listing--Identifier List ..................... 5-6 COBOL 74 Sample Program ............................... 6-5 CROSSREF Listing--File List ........................... 6-9 CROSSREF Listing--Identifier List ....................
PREFACE This manual describes the CROSSREF program development tool. CROSSREF produces cross-reference listings of application programs. This manual is written for application programmers who want to use CROSSREF on programs written in one or more of the following languages: C, COBOL 74, COBOL85, EXTENDED BASIC, FORTRAN, Pascal, SCREEN COBOL, and TAL, Tandem's Transaction Application Language. You should use this manual along with the reference manual of the language or languages that you are using.
PREFACE Section 6, "COBOL 74," describes using CROSSREF with COBOL 74. It provides a sample COBOL program and its cross-reference listing. Section 7, "COBOL85," describes using CROSSREF with COBOL85. It provides a sample COBOL85 program and its cross-reference listing. Section 8, "EXTENDED BASIC," describes using CROSSREF with EXTENDED BASIC. It provides a sample BASIC program and its cross-reference listing. Section 9, "FORTRAN," describes using CROSSREF with FORTRAN.
NOTATION CONVENTIONS The following list summarizes the conventions for syntax notation in this manual. Notation Meaning UPPERCASE LETTERS Uppercase letters represent keywords and reserved words; enter these items exactly as shown. italics Lowercase italic letters represent variable items that you supply. Brackets [] Brackets enclose optional syntax items. A group of vertically aligned items enclosed in brackets represents a list of selections from which you can choose one or none.
SECTION 1 INTRODUCTION WHAT IS CROSSREF? CROSSREF is a tool that produces a cross-reference listing of selected identifiers in your application program.
INTRODUCTION Which Languages Does CROSSREF Support? WHICH LANGUAGES DOES CROSSREF SUPPORT? CROSSREF supports the following languages: C, COBOL 74, COBOL85, EXTENDED BASIC, FORTRAN, Pascal, SCREEN COBOL, and TAL. (When you want to invoke COBOL 74, enter just COBOL at the system prompt. To invoke COBOL85, enter COBOL85.) You can use CROSSREF on application programs coded in any combination of these languages.
INTRODUCTION Compiler-Dependent CROSSREF STAND-ALONE CROSSREF Stand-alone from source information this manual CROSSREF enables you to obtain cross-reference data files coded in one or more languages and combine this into one cross-reference listing. The examples in describe stand-alone CROSSREF. When you run CROSSREF in stand-alone mode, it ignores the CROSSREF-related compiler directives in the source file. CROSSREF reads control information from the IN file that you specified at startup.
SECTION 2 RUNNING CROSSREF OVERVIEW This section describes how to run stand-alone CROSSREF from the GUARDIAN command interpreter. It gives the syntax for the CROSSREF command, describes how to start CROSSREF in interactive or noninteractive mode, and provides examples, including how to use CROSSREF on programs coded in one or more languages. CROSSREF COMMAND CROSSREF resides in the file named $SYSTEM.SYSTEM.CROSSREF. the CROSSREF command to execute CROSSREF.
RUNNING CROSSREF CROSSREF Command If you specify the OUT option and omit the file name, then CROSSREF suppresses all output to the OUT file. ; is an optional delimiter between the last GUARDIAN run option and the first CROSSREF command. You do not need to enter the semicolon; you can omit it without affecting the CROSSREF command. command-list is one or more CROSSREF commands. You must separate multiple commands with semicolons.
RUNNING CROSSREF Interactive Mode Interactive Mode CROSSREF operates in interactive mode when you omit both the IN file-name option and the command-list parameter from the CROSSREF command. When run in interactive mode, CROSSREF sends the following product banner to the terminal: CROSSREF - CROSS-REFERENCE PROGRAM-T9622C00-(15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1985, 1986 T9622C00 is the product number and version of CROSSREF.
RUNNING CROSSREF Noninteractive Mode Noninteractive Mode CROSSREF operates in noninteractive mode when you specify either the IN file-name or the command-list parameter in a CROSSREF run command. The following command directs CROSSREF to execute the commands in the EDIT file named COMMS and to send the output to the file named LISTING: 13> CROSSREF /IN comms, OUT listing/ CROSSREF terminates when it reaches the end of the file or when it encounters an EXIT command in the IN file.
RUNNING CROSSREF Single-Language Program Single-Language Program The following examples show how CROSSREF produces a crossreference listing for a program coded in a single language. To invoke CROSSREF from the GUARDIAN command interpreter, type CROSSREF. The IN file-name and OUT file-name options default to the home terminal. CROSSREF displays the product banner and issues the prompt character to show that it is ready to receive commands.
RUNNING CROSSREF Multi-Language Program In summary, the following four commands produce a cross-reference listing of the program file DREAM9: &SET LANGUAGE cobol &SCAN dream9 &GENERATE /OUT outfile/ &EXIT 16> Example 2 To produce a more selective cross reference, you can request that CROSSREF report only certain identifiers. Example 2 shows how to produce a cross-reference listing of just the conditions and labels in the program named DREAM9. (Labels are section and paragraph names in COBOL.
RUNNING CROSSREF Multi-Language Program (Section 4 describes the attribute specifications and the available settings.) 3. After CROSSREF scans the COBOL file, change the language attribute and customize the listing for the next file. This file is a set of FORTRAN subprocedures named FPROCS: &SET LANGUAGE fortran 4. Because this file contains only FORTRAN subprocedures with no main procedure, set the unreferenced identifier flag to ON. Otherwise, none of the subprocedures are listed. &SET UNREF ON 5.
SECTION 3 INTERPRETING CROSSREF OUTPUT This section describes the parts of a cross-reference listing and how to read its output. It also describes what happens if your source file contains compilation errors. CROSSREF LISTING The cross-reference listing consists of two parts: and an identifier list. a file list File List The file list appears at the beginning of a cross-reference listing. CROSSREF lists each file that it scans and assigns a number to each file.
INTERPRETING CROSSREF OUTPUT Identifier List FILE NO. [1] [2] [3] [4] FILE NAME. $DATA.TEST.COBMANE $DATA.TEST.COBLIBA $DATA.TEST.COBLIBC $DATA.TEST.COBLIBB Figure 3-1. Sample File List When a file is referenced in a program, the number and name of the file being referenced appears followed by the number and name of the file that contains the reference. The line number where the reference occurs appears at the end of the line.
INTERPRETING CROSSREF OUTPUT Identifier List Identifier Header The header defines the identifier. It contains six fields: • Identifier Name • Identifier Qualifier (not always used) • Attribute List • File Name • File Number • Line Number Figure 3-2 shows the format of an identifier header. Identifier Name Identifier Qualifier Attribute List File Name File No. Line No. S5009-001 Figure 3-2. Identifier Header Format Identifier Name.
INTERPRETING CROSSREF OUTPUT Identifier List Attribute List. The attribute list is a set of identifier attributes sent by the compiler to CROSSREF. The exact meaning of the field depends on the compiler. See the appropriate compiler section. This field always begins at column 35 of the header. If the combined length of the identifier name and qualifier exceeds 35 characters, the compiler attribute list is placed on the lines following the first header line. File Name.
INTERPRETING CROSSREF OUTPUT Identifier List Figure 3-3 shows the identifier header followed by an identifier reference line. Identifier Name Identifier Qualifier File Name File No. Attribute List Line No. Ref Code File Name File No. Line No. ••• S5009-002 Figure 3-3. Sample Reference Entry File Name. The file name is the name of the file in which the identifier references occur. It is printed on the leftmost field of the reference line. File Number.
INTERPRETING CROSSREF OUTPUT Identifier List Table 3-1. Reference Codes Code Description _______________________________________________________________ designates a read reference. This refers to any statement that uses the value of the identifier; it also refers to any parameter that is passed by value. D designates a definition. This refers to any nonexecutable statement that defines the type of variable or its storage. I designates an invocation reference.
INTERPRETING CROSSREF OUTPUT Compilation Errors CROSSREF IDENTIFIER CLASSES CROSSREF maintains a flag for each identifier class that it recognizes. By default, all CROSSREF identifier classes except for KEYWORDS and LITERALS are set to ON.
SECTION 4 CROSSREF COMMANDS This chapter describes the commands that you can use when executing CROSSREF. It covers commands that are common to the Program Development Tools (CROSSREF, BINDER, and INSPECT) and commands that are used only by CROSSREF. Table 4-1 lists all commands executable by CROSSREF. Those commands that are common to the three tools are marked with an asterisk (*). Each command is explained in detail following the table. Table 4-1.
CROSSREF COMMANDS Table 4-1. Summary of CROSSREF Commands (Page 2 of 2) Command Description _______________________________________________________________ displays the syntax of CROSSREF commands. LOG* directs a copy of the input commands and output produced by CROSSREF to a file. OBEY* reads commands from a specified file. OUT* directs output listing to a specified file. RESET restores attribute specifications to their initial values.
CROSSREF COMMANDS CROSSREF Attribute Specifications CROSSREF ATTRIBUTE SPECIFICATIONS Within the CROSSREF commands, the RESET, SAVE, SCAN, and SET commands allow you to set attribute specifications, a group of features which control: • The compiler that scans the source file and • The information that CROSSREF collects and reports. Table 4-2 lists and describes these attribute specifications. Table 4-2.
CROSSREF COMMANDS CROSSREF Attribute Specifications Table 4-2. CROSSREF Attribute Specifications (Page 2 of 2) Attribute Definition _______________________________________________________________ excludes specified files from the listing. PRIORITY specifies the execution priority at which the compiler runs. PROGRAM specifies the file containing the compiler. (You need to use this attribute only when the subvolume containing the compiler is not the same as the one that contains CROSSREF.
CROSSREF COMMANDS Example COMMENT COMMAND The COMMENT command allows you to add comments to the log of your CROSSREF session. The syntax of the COMMENT command is: COMMENT text text is any text you want to print as a comment. Considerations • See the description of the LOG command in this section for information on creating a log of your CROSSREF session. • To continue a comment on the following line, end the current line with an ampersand (&).
CROSSREF COMMANDS ENV Command ENV COMMAND The ENV command displays the current settings of the program environment parameters. The syntax of the ENV command is: [ LOG ] ENV [ / OUT file-name / [ SYSTEM ] [ VOLUME ] OUT file-name directs the list of current program environment settings to the specified file. LOG displays the current log file-name if logging is in progress. SYSTEM displays the current system name. VOLUME displays the current volume and subvolume names.
CROSSREF COMMANDS Examples Examples The following example displays the system name: &ENV SYSTEM The next example displays the values for all the parameters (LOG, SYSTEM, and VOLUME): &ENV 4-7
CROSSREF COMMANDS ERRORS Command ERRORS COMMAND The ERRORS command lists the diagnostic messages produced by the compiler during a SCAN command. The syntax of the ERRORS command is: ERRORS [ / OUT file-name / ] OUT file-name identifies a file to receive the list of compiler messages. file-name must be a valid GUARDIAN file name. Considerations • You must specify the ERRORS command after the SCAN command. If you specify an ERRORS command first, CROSSREF prints ERROR FILE EMPTY to the specified file.
CROSSREF COMMANDS Example Example The following example prints all diagnostic messages to the file named ERRFILE: &SET LANGUAGE cobol &SCAN build1 &ERRORS /OUT errfile/ &GENERATE /OUT $s.
CROSSREF COMMANDS EXIT Command EXIT COMMAND The EXIT command stops CROSSREF and returns control to the command interpreter. The syntax of the EXIT command is: EXIT Considerations • If you type EXIT before CROSSREF has sent the accumulated cross-reference information to the current OUT file, CROSSREF executes an implied GENERATE command. The implied GENERATE causes CROSSREF to send the output to the current CROSSREF OUT file before exiting and returning control to the command interpreter.
CROSSREF COMMANDS Example FC COMMAND The FC command allows you to edit or repeat a command. syntax of the FC command is: The FC Considerations The FC command works the same way in CROSSREF as it does in the command interpreter or EDIT. When you enter FC, the FC prompt appears on the next line followed by the last command that you entered. The FC prompt is a period (.). You can enter the subcommands I, R, or D to edit the displayed line.
CROSSREF COMMANDS GENERATE Command GENERATE COMMAND The GENERATE command prints all cross-reference information that has accumulated since the last GENERATE command or the beginning of the session and empties the CROSSREF storage buffers. The syntax of the GENERATE command is: GENERATE [ / OUT file-name / ] OUT file-name identifies a file to receive the cross-reference listing. file-name must be a valid GUARDIAN file name.
CROSSREF COMMANDS Example Example The following example prints the cross-reference listing to the file named LISTING: &SET LANGUAGE cobol &SCAN empsal &GENERATE /OUT listing/ &EXIT 12> 4-13
CROSSREF COMMANDS HELP Command HELP COMMAND The HELP command displays the syntax of CROSSREF commands. syntax of the HELP command is: The [ command-name ] HELP [ / OUT file-name / ] [ param-name ] [ ] OUT file-name directs the help output to the specified file. See the description of the OUT command in this section for additional information. command-name is the name of a CROSSREF command. param-name is one of the following parameters: class-name, classlist, or file-name.
CROSSREF COMMANDS Examples Examples The following example displays the names of all CROSSREF and system commands: &HELP The next example displays the syntax of the SET command: &HELP SET 4-15
CROSSREF COMMANDS LOG Command LOG COMMAND The LOG command writes a copy of the current session's input and output to a file. The syntax of the LOG command is: { TO file-name } LOG { } { STOP } TO file-name identifies a file to receive the copy of the commands and output. If the file does not exist, CROSSREF creates one using the specified file-name. STOP closes the current log file and stops all logging.
CROSSREF COMMANDS Example Example The following example writes a copy of all input commands and CROSSREF output to the file named LOGFILE. CROSSREF continues to write the output to the log file until you enter the LOG STOP command.
CROSSREF COMMANDS OBEY Command OBEY COMMAND The OBEY command reads commands from a specified file. syntax of the OBEY command is: The OBEY [ / OUT file-name / ] file-name OUT file-name directs any output listing to the specified file. However, error messages are also displayed at the terminal if you are using CROSSREF interactively. For additional information, see the description of the OUT command in this section. file-name is a standard GUARDIAN file name.
CROSSREF COMMANDS Example • If any part of the specification is invalid or if the file does not exist or cannot be opened, CROSSREF displays an error message and does not change the current source for command input. • If CROSSREF detects an error while processing an OBEY file, it closes the file and, in the case of nested OBEY files, any other OBEY files currently open. If the original input file was a terminal, CROSSREF issues a prompt on the terminal.
CROSSREF COMMANDS OUT Command OUT COMMAND The OUT command directs the output listing to a specified file. The syntax of the OUT command is: { OUT file-name } { command / OUT file-name / param-name } file-name is a standard GUARDIAN file name. command is a CROSSREF command. param-name specifies one or more parameters for command. Considerations • The first form of the OUT command redirects all CROSSREF output to file-name for the duration of the current CROSSREF session.
CROSSREF COMMANDS Examples Examples The following example sends all output to the file named EUSTACE: &OUT EUSTACE The next example sends the HELP command output to the file named FRED: &HELP /OUT FRED/ SCAN 4-21
CROSSREF COMMANDS RESET Command RESET COMMAND The RESET command restores attribute specifications to their initial values. The syntax of the RESET command is: { * } RESET { } { attribute-specification } * restores all attributes. attribute-specification is one of the following: CLASS [class-name] CLASS resets all identifier class flags to their default values.
CROSSREF COMMANDS RESET Command CPU restores the setting of the CPU to the same CPU that is running CROSSREF. DEFINITIONS ONLY turns off the DEFINITIONS ONLY setting. DIRECTIVES clears the string argument to be passed to the compiler during startup. EXCLUDE empties the identifier Exclude list. INCLUDE empties the identifier Include list. LANGUAGE clears the language setting. LIBRARY clears the library setting. MEM restores the MEM setting to its default value. OMIT empties the Omit list.
CROSSREF COMMANDS Considerations PRIORITY restores the priority setting for compiler runs to the priority of CROSSREF. PROGRAM restores the program setting. UNREF restores the unreferenced identifier flag to OFF. Considerations See the SET command for more information on the attribute specifications.
CROSSREF COMMANDS SAVE Command SAVE COMMAND The SAVE command saves set attributes after CROSSREF executes a GENERATE command. The syntax of the SAVE command is: { * } SAVE { } { attribute-specification } * saves all set attributes. attribute-specification is one of the following: CLASS saves all set identifier class flags. CPU saves the CPU setting. DEFINITIONS ONLY saves the DEFINITIONS ONLY setting. DIRECTIVES saves the string argument to be passed to the compiler during startup.
CROSSREF COMMANDS Considerations LIBRARY saves the library setting. MEM saves the MEM setting. PRIORITY saves the priority setting for compiler runs. PROGRAM saves the program setting. UNREF saves the unreferenced identifier flag setting to ON. Considerations • You must specify the SAVE command before the GENERATE command. • If you do not specify SAVE, all attributes are reset to their default values after a GENERATE command.
CROSSREF COMMANDS Example Example In the following example, the LITERALS class remains ON after the GENERATE command executes: &SET LANGUAGE cobol &SET CLASS LITERALS ON &SAVE CLASS &GENERATE &EXIT 13> 4-27
CROSSREF COMMANDS SCAN Command SCAN COMMAND The SCAN command specifies source files for CROSSREF to examine. The SCAN command can optionally set attribute specifications that are in effect only for the duration of the command. The syntax of the SCAN command is: SCAN file-list [ , attribute-specification ] ... file-list is one or more standard GUARDIAN file names. is as follows: The syntax { file-name } { ( file-name [ , file-name ] ...
CROSSREF COMMANDS SCAN Command class-name is one or more of the following: BLOCKDATAS BLOCKS CONDITIONS CONSTANTS FILES FMTLABELS FUNCTIONS INDEXES INLINES KEYWORDS LINENOS LITERALS MACROS MNEMONICS PROCEDURE PARAMS PROCEDURES PROGLABELS REGISTERS SCREENS SUBPROCS SYSVARS TYPES VARIABLES Not all class names are valid for all languages. If you specify a class name that is not valid for the current language, the identifier class flag is set, but it has no effect on the operation of the SCAN command.
CROSSREF COMMANDS SCAN Command ON tells CROSSREF to include the class in the listing. OFF tells CROSSREF to exclude the class from the listing. CPU cpu-number specifies the CPU that will run the compiler that works with CROSSREF. cpu-number must be a decimal number from 0 to 15, but the range of valid values depends on the number of processors in your system. The initial setting is the CPU on which CROSSREF is running.
CROSSREF COMMANDS SCAN Command { class-name } EXCLUDE { } { ( class-name [ , class-name ] ... ) } adds the specified identifier classes to the Exclude list. CROSSREF does not generate a cross-reference listing for identifiers found on this list, regardless of the identifier class settings. You cannot place literals on the Exclude list. Initially, the Exclude list is empty. { class-name } INCLUDE { } { ( class-name [ , class-name ] ... ) } adds the specified identifier classes to the Include list.
CROSSREF COMMANDS SCAN Command LIBRARY file-name specifies a library file name that CROSSREF passes to the COBOL 74, COBOL85, or SCREEN COBOL compiler during startup. The compiler reads text from the library file when it encounters unqualified COPY statements in the source file. Other compilers do not use the LIBRARY attribute. file-name must be a valid GUARDIAN file name. By default, no library file name is passed to the compiler.
CROSSREF COMMANDS Considerations The initial setting for compiler execution priority is the same as the CROSSREF priority. PROGRAM file-name specifies the file containing the compiler. This command is used when the compiler specified in LANGUAGE attribute-specification does not reside on the same subvolume as CROSSREF. file-name must be a standard GUARDIAN file name. The initial setting assumes that the compiler is on the same subvolume as CROSSREF.
CROSSREF COMMANDS Examples • The MEM attribute specification allows you to specify more memory than the compiler default. • The default execution priority for the compiler is the same as the execution priority of CROSSREF. You can specify a lower execution priority, but the compiler can never execute at a priority greater than the CROSSREF priority. • Every language has one or more constructs that are defined but never referenced, for example, the BASIC IMAGE statement or the FORTRAN COMMON block.
CROSSREF COMMANDS SET Command SET COMMAND The SET command changes the attribute specifications for the current execution of CROSSREF. The syntax of the SET command is: SET attribute-specification attribute-specification is one of the following: [ ON ] CLASS [ class-name [ ] ] [ OFF ] CLASS sets all identifier class flags to the default values. CLASS class-name sets the specified class-name to either its default value or to the indicated value if specified.
CROSSREF COMMANDS SET Command ON tells CROSSREF to include the class in the listing. OFF tells CROSSREF to exclude the class from the listing. CPU cpu-number specifies the CPU that will run the compiler that works with CROSSREF. cpu-number must be a decimal number from 0 to 15, but the range of valid values depends on the number of processors in your system. The initial setting is the CPU on which CROSSREF is running.
CROSSREF COMMANDS SET Command { class-name } EXCLUDE { } { ( class-name [ , class-name ] ... ) } adds the specified identifier classes to the Exclude list. CROSSREF does not generate a cross-reference listing for identifiers found on this list, regardless of the setting of the identifier's class flag. You cannot place literals on the Exclude list. Initially, the Exclude list is empty. { class-name } INCLUDE { } { ( class-name [ , class-name ] ... ) } adds the specified identifiers to the Include list.
CROSSREF COMMANDS SET Command LIBRARY file-name specifies a library file name that CROSSREF passes to the COBOL 74, COBOL85, or SCREEN COBOL compiler during startup. The compiler reads text from the library file when it encounters unqualified COPY statements in the source file. Other compilers do not use the LIBRARY attribute. By default, no library file name is passed to the compiler. MEM pages specifies the number of memory pages to be reserved for the compiler during a SCAN command.
CROSSREF COMMANDS Considerations The initial setting for compiler execution priority is the same as the CROSSREF priority. PROGRAM file-name specifies the file containing the compiler. You must use this command if the compiler specified in LANGUAGE attribute-specification does not reside on the same subvolume as CROSSREF. file-name must be a valid GUARDIAN file name. The initial setting assumes that the compiler is on the same subvolume as CROSSREF.
CROSSREF COMMANDS Examples • The use of the identifier class flags varies from language to language. See the appropriate language section for more information. • All compilers require that a semicolon precede the directive string specified in the startup message. If you do not include the preceding semicolon in a SET DIRECTIVES command, CROSSREF puts one in for you.
CROSSREF COMMANDS SHOW Command SHOW COMMAND The SHOW command displays the current settings of attribute specifications. By default, CROSSREF sends the output to the current CROSSREF OUT file. The syntax of the SHOW command is: { * } SHOW [ / OUT file-name / ] { } { attribute-specification } OUT file-name identifies a file to receive the output from the SHOW command. file-name must be a valid GUARDIAN file name.
CROSSREF COMMANDS SHOW Command BLOCKDATAS BLOCKS CONDITIONS CONSTANTS FILES FMTLABELS FUNCTIONS INDEXES INLINES KEYWORDS LINENOS LITERALS MACROS MNEMONICS PROCEDURE PARAMS PROCEDURES PROGLABELS REGISTERS SCREENS SUBPROCS SYSVARS TYPES VARIABLES CPU displays the current CPU setting. DEFINITIONS ONLY displays the current setting of the DEFINITIONS ONLY attribute. DIRECTIVES displays the current setting of the directive string. EXCLUDE displays the contents of the Exclude list.
CROSSREF COMMANDS Example MEM displays the current memory page setting. OMIT displays the files on the Omit list. PRIORITY displays the execution priority setting for the compiler during a SCAN command. PROGRAM displays the file to be executed as the compiler during a SCAN command. UNREF displays the setting of the unreferenced identifier flag. Considerations • The CROSSREF OUT file is set when you start CROSSREF, but you can change it during the CROSSREF execution using the system command OUT.
CROSSREF COMMANDS Example This command produces the following output: CLASS BLOCKS ON CLASS CONDITIONS ON CLASS FILES ON CLASS FUNCTIONS ON CLASS INLINES ON CLASS LINENOS ON CLASS MACROS ON CLASS PROCEDURE PARAMS CLASS PROGLABELS ON CLASS SCREENS ON CLASS SYSVARS ON CLASS VARIABLES ON CPU 6 DEFINITIONS ONLY FALSE DIRECTIVES UNDEFINED EXCLUDE LIST EMPTY INCLUDE LIST EMPTY LANGUAGE UNDEFINED LIBRARY UNDEFINED MEM UNDEFINED OMIT LIST EMPTY PRIORITY 140 PROGRAM UNDEFINED UNREF OFF 4-44 ON BLOCKDATAS ON CONS
CROSSREF COMMANDS Example SYSTEM COMMAND The SYSTEM command changes the default system setting. CROSSREF uses the default setting to find a filename if you do not explicitly specify a system name. The syntax of the SYSTEM command is: SYSTEM [ system ] system is a GUARDIAN system name. If you do not specify a system, the system in which CROSSREF is running becomes the default system.
CROSSREF COMMANDS VOLUME Command VOLUME COMMAND The VOLUME command changes the volume and subvolume settings. CROSSREF uses these settings to find a filename if you do not explicitly specify a volume and subvolume name. The syntax of the VOLUME command is: VOLUME volume [ .subvol ] volume is a GUARDIAN volume name. subvol is a GUARDIAN subvolume name. Examples The following example changes the default volume to $MKT: &VOLUME $mkt The next example changes the default volume and subvolume to $MKT.
SECTION 5 C This section describes the C identifier classes and provides a sample C program and its cross-reference listing. C IDENTIFIERS The CROSSREF utility indexes C programs according to the identifier classes listed in Table 5-1. Table 5-1 also shows the default settings for each class and what C data types correspond to each of these classes.
C Sample Listing Table 5-1. C Identifier Classes CROSSREF Default C Class Setting Type _______________________________________________________________ CONSTANTS ON Enumeration constants FUNCTIONS ON Functions MACROS ON #define(s) TYPES ON User-defined and compilerdefined (anonymous) types VARIABLES ON All variables NOTE CROSSREF includes a data type description for all identifier classes except MACROS and FUNCTIONS in the output listing.
C Sample Listing 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 /* * usage: wc [...] * * This program will count the number of lines, words, and characters in * a text file and report them to standard out. When multiple files are * specified a running total of all of the files is printed in addition * to the individual files' totals.
C Sample Listing 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 char line[MAXLINE]; int inword; char *p; for (nl = 0, nw = 0, nc = 0; fgets(line, MAXLINE, fp) != NULL; nl++) { for (p = line, inword = FALSE; *p != '\0'; p++, nc++) if (!inword && isalnum(*p)) { nw++; inword = TRUE; } else if (isspace(*p) || (ispunct(*p) && !((*p == '\'' || *p == '-') && (isalpha(*(p - 1)) && isalpha(*(p + 1)))))) inword = FALSE; } total_lines += nl; total_words += nw; total_chars += nc; printf("%s: %d
C Sample Listing Figure 5-2 shows the first page of the cross-reference listing. This is the cross-reference file list. It lists the name of each source file scanned. In this example four files were scanned. WCC is the C source code and STDIOH, CTYPEH, and STDLIBH are C library declaration files. See your C Reference Manual for details on the library declaration files.
C Sample Listing PAGE 2 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 106 TOTAL SYMBOLS COLLECTED WITH 205 TOTAL REFERENCES COLLECTED EXIT_SUCCESS WCC[1] FALSE WCC[1] 63 M 72 M WCC[1] STDIOH[2] 23 M 37 M 98 M 147 M 28 M 65 M 101 M 151 M 57 M 61 M WCC[1] 37 M 61 M WCC[1] 67 M WCC[1] 64 M WCC[1] 64 M WCC[1] 70 M WCC[1] 69 M WCC[1] 64 M FILE MAXLINE WCC[1] 53 M 68 M 104 M 154 M 73 M 113 M 159 M 76 M 116 M 169 M STDIOH[2] 35 _ctype WCC[1] CTYPEH[3] 64
C Sample Listing PAGE 3 NAME AND NAME QUALIFIER argv of main WCC[1] LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 26 D pointer to pointer to uns char formal 37 M 39 M 42 M 44 M WCC[1] 26 WCC[1] 23 M 42 M WCC[1] 54 of count WCC[1] 54 D pointer to uns char formal 78 M WCC[1] 54 of main WCC[1] pointer to struct automatic 37 M 42 M 43 M WCC[1] 28 28 D of count WCC[1] pointer to struct formal 61 M WCC[1] 54 54 D WCC[1] 27 WCC[1] 58 CTYPEH[3] 33 CTYPEH[3] 26 CTYPEH[3] 32 C
C Sample Listing PAGE 4 NAME AND NAME QUALIFIER printf WCC[1] STDIOH[2] 46 M 64 M 77 M size_t STDIOH[2] STDLIBH[4] 137 M 54 M 140 M 55 M 141 M 62 M stderr WCC[1] 32 M 39 M 44 M toascii WCC[1] 64 M 69 M 70 M total_chars WCC[1] 21 D total_lines WCC[1] total_words WCC[1] Figure 5-3.
SECTION 6 COBOL 74 This section describes the COBOL 74 identifier classes and provides a sample COBOL 74 program and its cross-reference listing. It also describes the compiler attributes that might appear in a cross-reference listing. COBOL 74 IDENTIFIERS The CROSSREF utility indexes COBOL 74 programs according to the identifier classes listed in Table 6-1. Table 6-1 also shows the the default settings for each identifier class and what COBOL 74 data types correspond to each of these classes.
COBOL 74 COBOL 74 Identifiers Table 6-1.
COBOL 74 USING COMPILER DIRECTIVES IN CROSSREF USING COMPILER DIRECTIVES IN CROSSREF Because CROSSREF actually invokes the COBOL 74 compiler to collect the identifier information, you might need to pass a default library file name or one or more directives to the compiler. (You supply the library file name for COPY statements that do not specify one.
COBOL 74 Sample Listing SAMPLE LISTING The following example invokes CROSSREF, scans the file named COBEX, and generates a listing to $s.#lp: 14> CROSSREF CROSSREF-CROSS-REFERENCE PROGRAM-T9622C00-(15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1985, 1986 &SET LANGUAGE cobol &SCAN cobex &GENERATE /OUT $s.#lp/ &EXIT 15> On the following pages, you can see the program and its crossreference listing. The listing includes all identifier classes except literals.
COBOL 74 Sample Listing 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 34 35 36 37 39 40 41 42 43 44 47 48 49 50 51 52 53 54 55 56 57 60 61 62 63 ?SAVE ALL ?SEARCH $SYSTEM.SYSTEM.COBOLLIB IDENTIFICATION DIVISION. PROGRAM-ID. FUPPERWARE. AUTHOR. ANN COBOL. INSTALLATION. TRANSACTIONS ANONYMOUS. DATE-WRITTEN. 29 FEBRUARY 1984. DATE-COMPILED.
COBOL 74 Sample Listing 64 65 66 67 68 69 70 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 106 107 108 109 110 111 112 113 114 115 116 117 119 120 121 122 05 NUMERIC-CPU 05 ALPHA-PIN. 10 PIN-HIGH-BYTE 10 PIN-LOW-BYTE 05 NUMERIC-PIN PIC X. PIC X. REDEFINES ALPHA-PIN PIC S9999 COMP. 01 FILE-DATA. 05 RECEIVE-FILE-STATUS. 10 STAT-1 PIC 9. 88 CLOSE-FROM-REQUESTER VALUE 1 THRU 3. 10 STAT-2 PIC 9. 01 SAVE-MESSAGE-STUFF. 05 FUP PIC X(21) VALUE "$SYSTEM.
COBOL 74 Sample Listing 123 124 125 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 156 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 180.1 MOVE ZERO TO SU-ERROR SYS-MSG-CODE. * Inject INFO command into STARTUP message to pass to FUP ENTER "PUTSTARTUPTEXT" USING STRING-PORTION, INFO-COMMAND, NULL-CPLIST GIVING STARTUP-RESULT.
COBOL 74 Sample Listing 181 182 183 184 185 186 187 188 189 191 192 193 194 195 196 197 198 199 200 201 202 203 204 DISPLAY FUP-FAILED " -- NEWPROCESS error #" SU-ERROR " = (" NEWPROCESS-ERR-LEFT "," NEWPROCESS-ERR-RIGHT ")" . WATCH. READ MESSAGE-IN-FILE. PERFORM CAPTURE-CPU-PIN. DISPLAY "-----" "(" NUMERIC-CPU "," NUMERIC-PIN ")" "-----" SYS-MSG-CODE. CAPTURE-CPU-PIN. MOVE CPU-PART TO CPU-LOW-BYTE. MOVE LOW-VALUES TO CPU-HIGH-BYTE. MOVE PIN-PART TO PIN-LOW-BYTE. MOVE LOW-VALUES TO PIN-HIGH-BYTE.
COBOL 74 Sample Listing Figure 6-2 shows the first page of the cross-reference listing. This is the cross-reference file list. It lists the name of each source file that CROSSREF scanned. In this example, only one file, COBEX, was scanned. PAGE 1 CROSSREF - CROSS-REFERENCE PROGRAM - T9622C00 - (15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1984, 1985, 1986 FILE NO. [1] FILE NAME $EM2.UCREF.COBEX Figure 6-2.
COBOL 74 Sample Listing PAGE 2 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 50 TOTAL SYMBOLS COLLECTED WITH 55 TOTAL REFERENCES COLLECTED ALPHA-CPU OF CPU-PIN-REDEF COBEX[1] 64 M 05 AN GROUP WSS SIZE=2 OFFSET=0 COBEX[1] 61 ALPHA-PIN OF CPU-PIN-REDEF COBEX[1] 69 M 05 AN GROUP WSS SIZE=2 OFFSET=2 COBEX[1] 66 CAPTURE-CPU-PIN OF AA COBEX[1] 194 M PARA COBEX[1] 200 COBEX[1] 62 COBEX[1] 63 COBEX[1] 55 COBEX[1] 158 COBEX[1] 78 COBEX[1] 94 OFFSET=21 COB
COBOL 74 Sample Listing PAGE 3 NAME AND NAME QUALIFIER COBEX[1] LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 32 M NEWPROCESS-ERR-LEFT OF SAVE-MESSAGE-STUFF 05 NM COBEX[1] 179 W 185 DISP WSS SIZE=4 OFFSET=36 OF SAVE-MESSAGE-STUFF 05 NM DISP 180 W 187 WSS SIZE=4 OFFSET=40 NEWPROCESS-ERR-RIGHT COBEX[1] NULL-CPLIST OF SAVE-MESSAGE-STUFF COBEX[1] 92 COBEX[1] 93 COBEX[1] 102 05 NM COMP WSS SIZE=4 OFFSET=80 NUMERIC-CPU OF CPU-PIN-REDEF COBEX[1] 196 05 NM COMP WSS SIZE=2 OFFSET=
COBOL 74 Sample Listing PAGE 4 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES OF RECEIVE-FILE-STATUS OF FILE-DATA 10 NM DISP COBEX[1] 111 DEFINITION POINT STAT-1 STRING-PORTION COBEX[1] OF SAVE-MESSAGE-STUFF 05 AN 129 M SU-ERROR OF SAVE-MESSAGE-STUFF 05 NM COBEX[1] 123 W 143 W 183 DISP COMP 146 COBEX[1] SYS-MSG-STOP COBEX[1] WATCH OF AA COBEX[1] Figure 6-3.
COBOL 74 Condition-Name COMPILER ATTRIBUTES CROSSREF collects identifier attribute information from the COBOL 74 compiler and prints it in the identifier header. The attributes are explained below. Alphabet-Name If the identifier is an alphabet-name, it is described in the header as MNEM. (MNEM might also indicate a mnemonic-name. See "Mnemonic-Name" in this section.) Alphabet-name has no significance on the Tandem implementation of COBOL 74 because the ASCII character set is the only one used.
COBOL 74 Data-Name Data-Name If the identifier is a data item, it is described in the header as ln category usage loc SIZE=size [V] OFFSET=offset [i INX[S]] [SPCL-REG] ln is the level number of the data-item.
COBOL 74 File-Name offset is the byte offset of the value of the data-item from the relevant base address; for example, from the start of the containing record. This corresponds to the identifier's position within a record. The offset is shown in decimal notation up to nine places without leading zeros. i INX[S] appears if the references to the data-item require subscripting or indexing. In that case, i is a number from 1 to 7 showing the number of subscripts.
COBOL 74 Index-Name org marks the file's organization. SEQ Sequential REL Relative INX Indexed acc marks the file's access mode. SEQ Sequential RAN Random DYN Dynamic It can be: It can be: Index-Name If the identifier is the name of an index item, it is described in the header as INX. The identifier qualifier shows the name of the table item that the index-name belongs to. An index item is always two bytes long. Literals CROSSREF prints literals before any other identifiers.
COBOL 74 Section-Name Paragraph-Name If the identifier is the name of a paragraph, it is described in the header as PARA. The identifier qualifier also indicates what section (if any) the paragraph belongs to. If code is generated for the program, %offset shows the code offset for this paragraph relative to the program's base. The offset is an octal number of six digits. Section-Name If the identifier is the name of a section, it is described in the header as SECT.
SECTION 7 COBOL85 This section describes the COBOL85 identifier classes and provides a sample COBOL85 program and its cross-reference listing. It also describes the compiler attributes that might appear in a cross-reference listing. COBOL85 IDENTIFIERS The CROSSREF utility indexes COBOL85 programs according to the identifier classes listed in Table 7-1. Table 7-1 also shows the the default settings for each identifier class and what COBOL85 data types correspond to each of these classes.
COBOL85 COBOL85 Identifiers Table 7-1.
COBOL85 Using Compiler Directives in CROSSREF USING COMPILER DIRECTIVES IN CROSSREF Because CROSSREF actually invokes the COBOL85 compiler to collect the identifier information, you might need to pass a default library file name or one or more directives to the compiler. (You supply the library file name for COPY statements that do not specify one.
COBOL85 Sample Listing SAMPLE LISTING The following example invokes CROSSREF, scans the file named COBEX85, and generates a listing to $s.#lp: 16> CROSSREF CROSSREF-CROSS-REFERENCE PROGRAM-T9622C00-(15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1985, 1986 &SET LANGUAGE cobol85 &SCAN cobex85 &GENERATE /OUT $s.#lp/ &EXIT 17> On the following pages, you can see the program and its crossreference listing. The listing includes all identifier classes except literals.
COBOL85 Sample Listing 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 34 35 36 37 39 40 41 42 43 44 47 48 49 50 51 52 53 54 55 56 57 60 61 62 63 ?SAVE ALL ?SEARCH $SYSTEM.SYSTEM.COBOLLIB IDENTIFICATION DIVISION. PROGRAM-ID. FUPPERWARE. * AUTHOR. ANN COBOL. * INSTALLATION. TRANSACTIONS ANONYMOUS. * DATE-WRITTEN. 24 June 1987. * DATE-COMPILED.
COBOL85 Sample Listing 64 65 66 67 68 69 70 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 106 107 108 109 110 111 112 113 114 115 115.1 116 117 119 120 121 05 NUMERIC-CPU 05 ALPHA-PIN. 10 PIN-HIGH-BYTE 10 PIN-LOW-BYTE 05 NUMERIC-PIN PIC X. PIC X. REDEFINES ALPHA-PIN PIC S9999 COMP. 01 FILE-DATA. 05 RECEIVE-FILE-STATUS. 10 STAT-1 PIC 9. 88 CLOSE-FROM-REQUESTER VALUE 1 THRU 3. 10 STAT-2 PIC 9. 01 SAVE-MESSAGE-STUFF. 05 FUP PIC X(21) VALUE "$SYSTEM.
COBOL85 Sample Listing 122 123 124 125 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 150 150.1 150.2 150.3 150.4 150.5 150.51 150.6 151 152 153 154 155 156 158 159 159.
COBOL85 Sample Listing 174 175 176 177 178 179 180 180.1 181 182 183 184 185 186 187 188 189 190 191 200 201 202 203 204 205 WHEN OTHER -- Received raw error from NEWPROCESS system procedure. -- Decompose it into left byte and right byte values. DIVIDE SU-ERROR BY 256 GIVING NEWPROCESS-ERR-LEFT REMAINDER NEWPROCESS-ERR-RIGHT * * DISPLAY FUP-FAILED " -- NEWPROCESS error #" SU-ERROR " = (" NEWPROCESS-ERR-LEFT "," NEWPROCESS-ERR-RIGHT ")" END-EVALUATE . CAPTURE-CPU-PIN.
COBOL85 Sample Listing Figure 7-2 shows the first page of the cross-reference listing. This is the cross-reference file list. It lists the name of each source file that CROSSREF scanned. In this example, only one file, COBEX85, was scanned. PAGE 1 CROSSREF - CROSS-REFERENCE PROGRAM - T9622C00 - (15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1984, 1985, 1986 FILE NO. [1] FILE NAME $EM2.UCREF.COBEX85 Figure 7-2.
COBOL85 Sample Listing PAGE 2 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 54 TOTAL SYMBOLS COLLECTED WITH 51 TOTAL REFERENCES COLLECTED ALPHA-CPU OF CPU-PIN-REDEF COBEX85[1] 64 M 05 AN GROUP SIZE=2 OFFSET=0 COBEX85[1] 61 ALPHA-PIN OF CPU-PIN-REDEF COBEX85[1] 69 M 05 AN GROUP SIZE=2 OFFSET=2 COBEX85[1] 66 CAPTURE-CPU-PIN OF AA COBEX85[1] 150.
COBOL85 Sample Listing PAGE 3 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES NEWPROCESS-ERR-LEFT OF SAVE-MESSAGE-STUFF 05 NM COBEX85[1] 179 W 185 NEWPROCESS-ERR-RIGHT COBEX85[1] DEFINITION POINT DISPLY SIZE=4 OFFSET=36 OF SAVE-MESSAGE-STUFF 05 NM DISPLY 180 W 187 SIZE=4 OFFSET=40 COBEX85[1] 92 COBEX85[1] 93 NULL-CPLIST OF SAVE-MESSAGE-STUFF 05 COBEX85[1] 131 P NM COMP SIZE=4 OFFSET=80 COBEX85[1] 102 NUMERIC-CPU OF CPU-PIN-REDEF COBEX85[1] 150.
COBOL85 Sample Listing PAGE 4 NAME AND NAME QUALIFIER COBEX85[1] LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 111 STRING-PORTION OF SAVE-MESSAGE-STUFF 05 AN COBEX85[1] 129 P COBEX85[1] 96 COBEX85[1] 183 90 SYS-MSG-ABEND OF SYS-MSG-CODE OF MESSAGE-IN OF MESSAGE-IN-FILE 88 NM COMP SIZE=2 OFFSET=0 COBEX85[1] 147 COBEX85[1] 42 SYS-MSG-CODE COBEX85[1] 40 COBEX85[1] 41 SU-ERROR OF SAVE-MESSAGE-STUFF COBEX85[1] 123 W 05 NM 143 W DISPLY SIZE=7 OFFSET=63 COMP 146 SIZE=2 159 OFFSET=34 173
COBOL85 Condition-Name COMPILER ATTRIBUTES CROSSREF collects identifier attribute information from the COBOL85 compiler and prints it in the identifier header. The attributes are explained below. Alphabet-Name If the identifier is an alphabet-name, it is described in the header as ALPHABET IS definition. definition can be STANDARD-1, SPECIAL, or system-name depending on what you entered in your program. If you specified one of the reserved words STANDARD-1, STANDARD-2, or NATIVE, STANDARD-1 appears.
COBOL85 Data-Name If the identifier represents a condition-name that tests an external switch, it described in the header as CONDITION IS SWITCH-ss {ON } {OFF} ss is a decimal integer from 1 to 15 that identifies which switch the program is testing. ON or OFF indicates which state is being tested. If the condition name is qualified, the qualifier identifies the mnemonic-name with which the condition-name is associated.
COBOL85 File-Name size shows the size in bytes of the identifier's value in decimal notation (up to nine places without leading zeros). V appears in the attribute list if the data-item contains a subordinate item that is a table with a variable number of occurrences. offset shows the byte offset of the value of the data-item from the relevant base address; for example, from the start of the containing record. The offset is shown in decimal notation up to nine places without leading zeros.
COBOL85 External Switch ORG marks the file's organization. SEQ Sequential REL Relative INX Indexed ACC marks the file's access mode. SEQ Sequential RAN Random DYN Dynamic It can be: It can be: The RECORD entry shows record size in bytes, expressed in decimal notation. F indicates the records are of fixed length; V indicates the records are of variable length, each having up to the displayed maximum size.
COBOL85 Paragraph-Name Literals CROSSREF prints literals before any other identifiers. They are shown exactly as they appear in the source file; if they have quotation marks in the source file, they have them in the crossreference listing. Mnemonic-Name If the identifier is a mnemonic-name, it is described in the header as { CHANNEL-cc } MNEMONIC IS { Tandem-name } { SWITCH-ss } When the mnemonic-name refers to a channel, CHANNEL-cc appears in the header.
COBOL85 Program-Name Program-Name If the identifier is the name of a program, it is described in the header as PROGRAM. Section-Name If the identifier is the name of a section, it is described in the header as SECTION. If code is generated for the program, %offset shows the code offset for this section relative to the base of the containing program. %offset is an octal number of six digits. Symbolic-Character If the identifier is a symbolic-character, it is described in the header as SYMBOLIC IS vvv.
SECTION 8 EXTENDED BASIC This section describes the EXTENDED BASIC identifier classes and provides a sample BASIC program and its cross-reference listing. EXTENDED BASIC IDENTIFIERS The CROSSREF utility indexes EXTENDED BASIC programs according to the identifier classes listed in Table 8-1. Table 8-1 also shows the default settings for each identifier class and what EXTENDED BASIC data types correspond to each of these classes.
EXTENDED BASIC Sample Listing Table 8-1. EXTENDED BASIC Identifier Classes CROSSREF Default BASIC Class Setting Type _______________________________________________________________ FUNCTIONS ON User-defined functions KEYWORDS OFF Keywords (reserved words) LINENOS ON Line numbers LITERALS OFF Literals SYSVARS ON System variables VARIABLES ON Variables Notice that the default setting for KEYWORDS and LITERALS is OFF.
EXTENDED BASIC Sample Listing The line numbers shown in the CROSSREF listing represent the EXTENDED BASIC line number plus the continuation number of the BASIC statement. For example, line 230 in the sample program (see Figure 8-1) contains statements 230, 230.01, and 230.02. Lines 230.01 and 230.
EXTENDED BASIC Sample Listing 100 ! 200 210 220 230 ! Set up function to find current month's stuff. currentmo$ = MID$(DAT$,4,3) DEF fnthismonth(tdate$) IF MID$(tdate$,4,3)=currentmo$ THEN fnthismonth=1 ELSE fnthismonth=0 FNEND 240 300 310 320 Print monthly account activity summary. ! Set up map and open account file.
EXTENDED BASIC Sample Listing Figure 8-2 shows the first page of the cross-reference listing. This is the cross-reference file list. It lists the name of each source file scanned. In this example, only one file, BASEX, was scanned. PAGE 1 CROSSREF - CROSS-REFERENCE PROGRAM - T9622C00 - (15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1984, 1985, 1986 FILE NO. [1] FILE NAME $EM2.UCREF.BASEX Figure 8-2.
EXTENDED BASIC Sample Listing PAGE 2 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 94 TOTAL SYMBOLS COLLECTED WITH 106 TOTAL REFERENCES COLLECTED 600 BASEX[1] 910.01 BASEX[1] 410 BASEX[1] 410.01 BASEX[1] 410.02 BASEX[1] 540.01 BASEX[1] 610.
EXTENDED BASIC Sample Listing PAGE 3 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES BASEX[1] 310 D 540 P LNAME$ BASEX[1] 310 D STRING VARIABLE WITHIN MAP, SIZE=20 BYTES 540.01 TDATE$ BASEX[1] 220 D STRING VARIABLE 230 540.02 FLOATING-POINT, REAL(64), VARIABLE 540.02 W 620 TOTAL BASEX[1] Figure 8-3. DEFINITION POINT 540.
SECTION 9 FORTRAN This section describes the FORTRAN identifier classes and provides a sample FORTRAN program and its cross-reference listing. FORTRAN IDENTIFIERS The CROSSREF utility indexes FORTRAN programs according to the identifier classes listed in Table 9-1. Table 9-1 also shows the default settings for each identifier class and what FORTRAN data types correspond to each of these classes.
FORTRAN FORTRAN Identifiers Table 9-1.
FORTRAN Sample Listing SAMPLE LISTING The following example starts CROSSREF, scans the file named FORTEX, and generates a listing to $s.#lp: 15> CROSSREF CROSSREF-CROSS-REFERENCE PROGRAM-T9622C00-(15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1985, 1986 &SET LANGUAGE fortran &SCAN fortex &GENERATE /OUT $s.#lp/ &EXIT 16> On the following pages, you can see the program and its crossreference listing. The listing includes all identifier classes except literals.
FORTRAN Sample Listing 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 PROGRAM SORT C Program reads and sorts a file of up to 50 numbers.
FORTRAN Sample Listing Figure 9-2 shows the first page of the cross-reference listing. This is the cross-reference file list. It lists the name of each source file scanned. In this example, only one file, FORTEX, was scanned. PAGE 1 CROSSREF - CROSS-REFERENCE PROGRAM - T9622C00 - (15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1984, 1985, 1986 FILE NO. [1] FILE NAME $EM2.UCREF.FORTEX Figure 9-2.
FORTRAN Sample Listing PAGE 2 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 34 TOTAL SYMBOLS COLLECTED WITH 78 TOTAL REFERENCES COLLECTED 100 13 11 M PROGRAM LABEL 13 D FORTEX[1] FORTEX[1] 60 57 M FORMAT LABEL 60 D FORTEX[1] FORTEX[1] 18 12 M PROGRAM LABEL 15 M 18 D FORTEX[1] FORTEX[1] 61 58 M FORMAT LABEL 61 D FORTEX[1] FORTEX[1] 42 37 M PROGRAM LABEL 38 M 42 D FORTEX[1] FORTEX[1] 43 36 M PROGRAM LABEL 43 D FORTEX[1] FORTEX[1] 25 12 M FORMAT LA
FORTRAN Sample Listing PAGE 3 NAME AND NAME QUALIFIER MAXCOUNT FORTEX[1] 52 D MESSAGE FORTEX[1] 47 D NUMBERS FORTEX[1] LANGUAGE-DEPENDENT ATTRIBUTES FORTEX[1] 52 CHARACTER*(*) DUMMY VARIABLE 51 D 57 FORTEX[1] 47 ARRAY(1:50) OF REAL, IN /BLANK^/ 8 D 12 W 21 P FORTEX[1] 6 6 D NUMBERS FORTEX[1] ARRAY(1:50) OF REAL, IN /BLANK^/ 55 D 58 FORTEX[1] 53 53 D PRTNUMS FORTEX[1] SUBROUTINE 22 I 47 D FORTEX[1] 47 20 I SORTNUMS FORTEX[1] SUBROUTINE 30 D FORTEX[1] 30 21 I 39 39 W REAL VAR
SECTION 10 PASCAL This section describes the Pascal identifier classes and provides a sample Pascal program and its cross-reference listing. PASCAL IDENTIFIERS The CROSSREF utility indexes Pascal programs according to the identifier classes listed in Table 10-1. Table 10-1 also shows the default settings for each class and what Pascal data types correspond to each of these classes.
PASCAL Sample Listing Table 10-1. Pascal Identifier Classes CROSSREF Default Pascal Class Setting Type _______________________________________________________________ BLOCKS ON Public variables CONSTANTS ON Named constants PROCEDURES ON Procedures and functions PROGLABELS ON GOTO labels TYPES ON All data types VARIABLES ON Non-public variables SAMPLE LISTING The following example starts CROSSREF, scans the file named PASCALEX, and generates a listing to $s.
PASCAL Sample Listing 1 2 3 4 5 6 7 8 9 10 11 12 13 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 41 42 44 45 46 47 48 49 50 51 52 53 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 { This program reads data base input from the terminal and enters { it into a memory resident data base. PROGRAM CrossrefExample(INPUT,OUTPUT); IMPORT BEGIN TYPE Date PlaceName PersonName PersonKind Level END; } } =INTEGER; =STRING[20]; =STRING[20]; =(National,Alien); = 1..
PASCAL Sample Listing 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 97 98 99 100 101 102 103 104 105 106 111 Alien: END; {CASE} END; {MakePerson} BEGIN NEW(PersonRecPointer); WHILE NOT EOF(INPUT) DO BEGIN WRITELN( WRITELN( WRITELN( WRITELN( WRITELN( WRITELN( WRITELN( 'Name:' ); 'JobLevel: '); 'BirthDate:'); 'BirthPlace:'); 'CountryOfOrigin:'); 'DateOfEntry:'); 'PortOfEntry:'); READLN( READLN( READLN( READLN( READLN( READLN( READLN( Name); JobLevel); BirthDate); BirthPlace); Coun
PASCAL Sample Listing Figure 10-2 shows the first page of the cross-reference listing. This is the cross-reference file list. It lists the name of each source file scanned. In this example only one file, PASCALEX, was scanned. PAGE 1 CROSSREF - CROSS-REFERENCE PROGRAM - T9622C00 - (15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1984, 1985, 1986 FILE NO. [1] FILE NAME $EM2.UCREF.PASCALEX Figure 10-2.
PASCAL Sample Listing PAGE 2 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 106 TOTAL SYMBOLS COLLECTED WITH 217 TOTAL REFERENCES COLLECTED ALIEN PUBLIC PASCALEX[1] PASCALEX[1] 10 PASCALEX[1] 59 PASCALEX[1] 46 PLACENAME FIELD 71 W PASCALEX[1] 31 BIRTHPLACE OF ROUTINE MAKETHEPERSON PLACENAME PARAM PASCALEX[1] 60 D 71 PASCALEX[1] 60 BIRTHPLACE PASCALEX[1] 47 COUNTRYOFORIGIN OF RECORD PERSON PLACENAME FIELD PASCALEX [1] 32 D 73 W PASCALEX[1] 32 COUNTRYOFORIGIN O
PASCAL Sample Listing PAGE 3 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES PASCALEX[1] 49 D EOF PREDEFINED PASCALEX[1] 86 I INPUT PUBLIC PASCALEX[1] 3 D INTEGER PREDEFINED PASCALEX[1] 7 M INT16 VAR 93 W DEFINITION POINT 99 ROUTINE TEXT VAR 86 W 88 W 89 W 90 W 91 W PASCALEX[1] 92 W 93 W 3 94 W INT16 TYPE JOBLEVEL OF RECORD PERSON PASCALEX[1] 28 D PASCALEX[1] 28 PASCALEX[1] 58 PASCALEX[1] 45 PASCALEX[1] 11 MAKETHEPERSON OF ROUTINE CROSSREFEXAMPLE ROUTINE PASCALEX[1] 56
PASCAL Sample Listing PAGE 4 NAME AND NAME QUALIFIER OUTPUT PUBLIC PASCALEX[1] PERSON LANGUAGE-DEPENDENT ATTRIBUTES 3 D TEXT VAR 88 W 89 W 90 W 91 W DEFINITION POINT 92 W PASCALEX[1] 93 W 94 W OF ROUTINE CROSSREFEXAMPLE 25 D RECORD TYPE 29 M 37 M PERSONKIND PUBLIC PASCALEX[1] 10 D ENUMERATION TYPE 30 M PERSONNAME PUBLIC PASCALEX[1] 9 D PLACENAME TYPE 26 M 44 M PASCALEX[1] PERSONRECPOINTER PASCALEX[1] OF ROUTINE CROSSREFEXAMPLE PTRTOPERSON VAR 52 D 84 W 98 W PLACENAME PUBLIC PASCALEX[1
SECTION 11 SCREEN COBOL This section describes the SCREEN COBOL identifier classes and provides a sample SCREEN COBOL program and its cross-reference listing. SCREEN COBOL IDENTIFIERS The CROSSREF utility indexes SCREEN COBOL programs according to the identifier classes listed in Table 11-1. Table 11-1 also shows the default settings for each identifier class and what SCREEN COBOL data types correspond to each of these classes.
SCREEN COBOL SCREEN COBOL Identifiers Table 11-1.
SCREEN COBOL Sample Listing SAMPLE LISTING The following example starts CROSSREF, scans the file named SCOBEX, and generates a listing to $s.#lp: 14> CROSSREF CROSSREF-CROSS-REFERENCE PROGRAM-T9622C00-(15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1985, 1986 &SET LANGUAGE scobolx &SCAN scobex &GENERATE /OUT $s.#lp/ &EXIT 15> On the following pages, you can see the program and its crossreference listing. The listing includes all identifier classes except literals.
SCREEN COBOL Sample Listing 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 IDENTIFICATION DIVISION. Program-id. ScdragnA. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. T16. OBJECT-COMPUTER. T16, Terminal is T16-6530. * Character-set is US ASCII * Character-set is USASCII. SPECIAL-NAMES.
SCREEN COBOL Sample Listing 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 05 FILLER AT 3, 14 VALUE "Press the appropriate function key to test the ". 05 FILLER AT 4, 14 VALUE "character set desired. ". 05 FILLER AT 5, 14 VALUE "The screens will contain all instructions necessary". 05 FILLER AT 6, 14 VALUE "to run the tests". 05 L1 AT 8, 14 PIC X(65) FROM INFO1 .
SCREEN COBOL Sample Listing 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 Step1. Display base DRAGON-SCREEN. Display L1. Display " " in L2. Display " " in L3. Display " " in L4. Accept UNTIL F1 F2 F3 F4 F5 F6 F7 F14 RETURN-KEY Escape on SF16. If termination-status = 10 move "YES" to end-of-test else move space to info1.
SCREEN COBOL Sample Listing 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 perform TEST5-ERROR. TEST6. SWEDISH/FINNISH Call scdragn2 on error perform TEST6-ERROR. * TEST7. DANISH/NORWEGIAN Call scdragn4 on error perform TEST7-ERROR. * RECOVER-SCRN1. DISPLAY RECOVERY. DISPLAY-RETURN. MOVE "RETURN KEY PRESSED" TO ERR-MSG. DISPLAY TEMP ERR-WINDOW. / TEST1-ERROR.
SCREEN COBOL Sample Listing Figure 11-2 shows the first page of the cross-reference listing. This is the cross-reference file list. It lists the name of each source file scanned. In this example, only one file, SCOBEX, was scanned. PAGE 1 CROSSREF - CROSS-REFERENCE PROGRAM - T9622C00 - (15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1984, 1985, 1986 FILE NO. [1] FILE NAME $EM2.UCREF.SCOBEX Figure 11-2. CROSSREF Listing--File List The rest of the listing consists of the identifier list.
SCREEN COBOL Sample Listing PAGE 2 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 84 TOTAL SYMBOLS COLLECTED WITH 61 TOTAL REFERENCES COLLECTED DISPLAY-RETURN SCOBEX[1] 138 M PARA DRAGON-SCREEN SCOBEX[1] 117 END-OF-TEST SCOBEX[1] 01 110 AN 108 W ERR-MSG SCOBEX[1] 01 187 W AN 94 01 SCOBEX[1] 186 SCOBEX[1] 54 DISP 126 W SCOBEX[1] 48 DISP SCOBEX[1] 47 SCOBEX[1] 92 SCREEN ERR-WINDOW OF DRAGON-SCREEN SCOBEX[1] 188 05 F1 MNEM FUNC-KEY SCOBEX[1] 14 MNEM
SCREEN COBOL Sample Listing PAGE 3 NAME AND NAME QUALIFIER SCOBEX[1] LANGUAGE-DEPENDENT ATTRIBUTES 73 INFO4 SCOBEX[1] 01 AN DISP SCOBEX[1] 45 01 AN DISP SCOBEX[1] 46 76 INFO5 SCOBEX[1] DEFINITION POINT 79 L1 OF DRAGON-SCREEN SCOBEX[1] 118 05 SCREEN FIELD SCOBEX[1] 65 L2 OF DRAGON-SCREEN SCOBEX[1] 119 05 SCREEN FIELD SCOBEX[1] 68 L3 OF DRAGON-SCREEN SCOBEX[1] 120 05 SCREEN FIELD SCOBEX[1] 71 L4 OF DRAGON-SCREEN SCOBEX[1] 121 05 SCREEN FIELD SCOBEX[1] 74 SCOBEX[
SCREEN COBOL Sample Listing PAGE 4 NAME AND NAME QUALIFIER SCOBEX[1] TERMINATION-STATUS SCOBEX[1] LANGUAGE-DEPENDENT ATTRIBUTES 109 M 125 TEST1 SCOBEX[1] 130 M TEST1-ERROR SCOBEX[1] 145 M TEST2 SCOBEX[1] 131 M TEST2-ERROR SCOBEX[1] 151 M TEST3 SCOBEX[1] 132 M TEST3-ERROR SCOBEX[1] 157 M TEST4 SCOBEX[1] 133 M TEST4-ERROR SCOBEX[1] 163 M TEST5 SCOBEX[1] 134 M TEST5-ERROR SCOBEX[1] 169 M TEST6 SCOBEX[1] 135 M TEST6-ERROR SCOBEX[1] 175 M TEST7 SCOBEX[1] 136 M TEST7-ERROR SCOBEX[1
SECTION 12 TAL This section describes the TAL identifier classes and provides a sample TAL program and its cross-reference listing. TAL IDENTIFIERS The CROSSREF utility indexes TAL programs according to the identifiers listed in Table 12-1. Table 12-1 also shows the default settings for each identifier class and what data types correspond to each of these classes.
TAL TAL Identifiers Table 12-1.
TAL Sample Listing SAMPLE LISTING The following example starts CROSSREF, scans the file named TALEX, and generates a listing to $s.#lp: 16> CROSSREF CROSSREF-CROSS-REFERENCE PROGRAM-T9622C00-(15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1985, 1986 &SET LANGUAGE tal &SCAN talex &GENERATE /OUT $s.#lp/ &EXIT 17> On the following pages, you can see the program and its crossreference listing. The listing includes all TAL types because all classes are ON by default.
TAL Sample Listing 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 INT PROC Ascii(v,rjust,stg); INT v; ! the integer value to convert INT rjust; ! right justify result flag STRING .
TAL Sample Listing Figure 12-2 shows the first page of the cross-reference listing. This is the cross-reference file list. It lists the name of each source file scanned. In this example, only one file, TALEX, was scanned. PAGE 1 CROSSREF - CROSS-REFERENCE PROGRAM - T9622C00 - (15JUL87) Copyright Tandem Computers Incorporated 1982, 1983, 1984, 1985, 1986 FILE NO. [1] FILE NAME $EM2.UCREF.TALEX Figure 12-2.
TAL Sample Listing PAGE 2 NAME AND NAME QUALIFIER LANGUAGE-DEPENDENT ATTRIBUTES DEFINITION POINT 8 TOTAL SYMBOLS COLLECTED WITH 34 TOTAL REFERENCES COLLECTED B 22 W STRING DIRECT VARIABLE 30 W 40 42 TALEX[1] 6 OF ASCII TALEX[1] 22 INT DIRECT VARIABLE 24 W 30 31 W 34 TALEX[1] 10 OF ASCII TALEX[1] 34 W INT DIRECT VARIABLE 36 W 40 42 44 TALEX[1] 8 OF ASCII TALEX[1] 1 D INT DIRECT VARIABLE 38 TALEX[1] 3 OF ASCII TALEX[1] INT DIRECT VARIABLE 27 TALEX[1] 9 15 W OF ASCII TALEX[1]
APPENDIX A SYNTAX SUMMARY The following is a syntax summary of the commands that you can use when executing CROSSREF.
SYNTAX SUMMARY EXIT _________________________________________________________________ EXIT EXIT _________________________________________________________________ FC FC _________________________________________________________________ GENERATE GENERATE [ / OUT file-name / ] _________________________________________________________________ HELP [ command-name ] HELP [ / OUT file-name / ] [ param-name ] [ ] _________________________________________________________________ LOG { TO file-name
SYNTAX SUMMARY RESET _________________________________________________________________ OBEY OBEY [ / OUT file-name / ] file-name _________________________________________________________________ OUT { OUT file-name } { command / OUT file-name / param-name } _________________________________________________________________ RESET { * } RESET { } { attribute-specification } attribute-specification is one of the following: CLASS [class-name] class-name is one of the following: BLOCKDATAS BLOCKS CONDITIONS
SYNTAX SUMMARY SAVE DEFINITIONS ONLY DIRECTIVES EXCLUDE INCLUDE LANGUAGE LIBRARY MEM OMIT PRIORITY PROGRAM UNREF _________________________________________________________________ SAVE { * } SAVE { } { attribute-specification } attribute-specification is one of the following: CLASS A-4
SYNTAX SUMMARY SCAN CPU DEFINITIONS ONLY DIRECTIVES LANGUAGE LIBRARY MEM PRIORITY PROGRAM UNREF _________________________________________________________________ SCAN SCAN file-list [ , attribute-specification ] ... file-list has the following syntax: { file-name } { ( file-name [ , file-name ] ...
SYNTAX SUMMARY SCAN { { class-name } CLASS { { * } { class-list [ ON ] } [ OFF ] } } includes the following detailed parameters: class-name is one of the following: BLOCKDATAS BLOCKS CONDITIONS CONSTANTS FILES FMTLABELS FUNCTIONS INDEXES INLINES KEYWORDS LINENOS LITERALS MACROS MNEMONICS PROCEDURE PARAMS PROCEDURES PROGLABELS REGISTERS SCREENS SUBPROCS SYSVARS TYPES VARIABLES class-list has the following syntax: { [ ON ] [ ON ] } { ( name [ ] [ , name [ ] ]...
SYNTAX SUMMARY SET { { { LANGUAGE { { { { { BASIC C COBOL COBOL85 FORTRAN PASCAL SCOBOL TAL } } } } } } } } LIBRARY file-name MEM pages { file-name } OMIT { } { ( file-name [ , file-name ] ...
SYNTAX SUMMARY SET BLOCKDATAS BLOCKS CONDITIONS CONSTANTS FILES FMTLABELS FUNCTIONS INDEXES INLINES KEYWORDS LINENOS LITERALS MACROS MNEMONICS PROCEDURE PARAMS PROCEDURES PROGLABELS REGISTERS SCREENS SUBPROCS SYSVARS TYPES VARIABLES CPU cpu-number DEFINITIONS ONLY DIRECTIVES " [ ; ] directive... " { class-name } EXCLUDE { } { ( class-name [ , class-name ] ... ) } { class-name } INCLUDE { } { ( class-name [ , class-name ] ...
SYNTAX SUMMARY SET PROGRAM file-name { ON } UNREF { OFF } { ONLY } _________________________________________________________________ A-9
SYNTAX SUMMARY SHOW _________________________________________________________________ SHOW { * } SHOW [ / OUT file-name / ] { } { attribute-specification } attribute-specification is one of the following: CLASS [class-name] class-name is one of the following: BLOCKDATAS BLOCKS CONDITIONS CONSTANTS FILES FMTLABELS FUNCTIONS INDEXES CPU DEFINITIONS ONLY DIRECTIVES EXCLUDE INCLUDE LANGUAGE LIBRARY A-10 INLINES KEYWORDS LINENOS LITERALS MACROS MNEMONICS PROCEDURE PARAMS PROCEDURES PROGLABELS REGISTERS SC
SYNTAX SUMMARY VOLUME MEM OMIT PRIORITY PROGRAM UNREF _________________________________________________________________ SYSTEM SYSTEM [ system ] _________________________________________________________________ VOLUME VOLUME volume [ .
APPENDIX B WARNING AND ERROR MESSAGES This appendix contains a summary of all the warning and error messages that CROSSREF generates. WARNING MESSAGES Warning messages indicate a minor discrepancy in the operation of CROSSREF. CROSSREF continues to execute the command. Warning messages are printed for your information. Warning messages are either prefixed with "**** WARNING ****" or displayed exactly as shown in this appendix.
WARNING AND ERROR MESSAGES Warning Messages Include list identifier not found in crossref - identifier Cause: CROSSREF placed the specified identifier on the include list but was unable to find any references to include. Recovery: You might have specified the wrong files for CROSSREF to scan. If so, you can correct the problem with a subsequent SCAN command.
WARNING AND ERROR MESSAGES Error Messages ERROR MESSAGES Error messages indicate that CROSSREF is unable to execute a command for some reason. You must correct the situation before CROSSREF can execute the command. Error messages are either prefixed with "**** ERROR ****" or displayed exactly as shown in this appendix. Compiler Communication Lost Cause: The compiler process halted for some reason. CROSSREF also generates this message when the processor running the compiler fails.
WARNING AND ERROR MESSAGES Error Messages Effective input record is too long Cause: You entered a line greater than 528 characters. Recovery: Break the line into several commands and reissue it. file-error-message (error-number) file-name Cause: CROSSREF produces this error when it encounters a GUARDIAN file error on one of the files that it is scanning. Recovery: See the Operator Messages: description of the error.
WARNING AND ERROR MESSAGES Error Messages Identifier found in include list Cause: The identifier specified in the last SET EXCLUDE command was already on the include list. CROSSREF ignores the command, and the identifier remains on the include list. Recovery: If you want to place the identifier on the exclude list, you must first reset the include list. Identifier too long Cause: You specified an identifier name greater than 31 characters.
WARNING AND ERROR MESSAGES Error Messages Illegal OBEY file - ignored Cause: The OBEY file specified was the same as the current IN file. CROSSREF continues reading commands from the current IN file. Recovery: Reissue the command with the correct file name. Illegal OUT file - ignored Cause: The OUT file specified in the last command was the same as the current IN file. CROSSREF continues using the current OUT file. Recovery: Reissue the command with a valid file name.
WARNING AND ERROR MESSAGES Error Messages Invalid file name Cause: The file name specified in the last command did not conform to GUARDIAN standards. Recovery: Reissue the command with a valid file name. Invalid Subvolume name Cause: The volume or subvolume name specified in the last command did not conform to GUARDIAN standards. Recovery: Reissue the command with a valid GUARDIAN volume and/or subvolume name. Invalid syntax Cause: You made an error typing the previous command.
WARNING AND ERROR MESSAGES Error Messages Invalid System name Cause: The system specified in the last command did not exist, or the name did not conform to GUARDIAN standards. Recovery: Reissue the command with a valid GUARDIAN system name. Newprocess error error-number [ , file-error-number ] Cause: An error occurred while CROSSREF was attempting to start the compiler. The cause of the error depends on the error number specified in the error message.
WARNING AND ERROR MESSAGES Error Messages No language specified, scan is aborted Cause: You did not set the LANGUAGE attribute before issuing a SCAN command. Recovery: Specify the LANGUAGE attribute in a SET command or in a SCAN command. OBEY nesting exceeds maximum Cause: You attempted to nest your OBEY files greater than four deep. Recovery: Only four OBEY files can be active at any one time. CROSSREF ignores the fifth OBEY command and continues executing commands from the fourth OBEY file.
WARNING AND ERROR MESSAGES Fatal Error Messages Unterminated continuation line Cause: You placed a continuation character at the end of a line, but the line was followed by an end of file. Recovery: Either type the line with no continuation character, or complete the command on the following line before terminating input. Unterminated string Cause: You failed to put a closing quote on a DIRECTIVES attribute specification. Recovery: Reissue the command with a closing quote included.
WARNING AND ERROR MESSAGES Fatal Error Messages FATAL ERROR MESSAGES The following is a list of fatal error messages generated by CROSSREF. Fatal errors indicate situations in which CROSSREF cannot continue operation. When CROSSREF encounters a fatal error, it displays an error message to indicate the cause and halts all processing. Fatal error messages are either prefixed with "**** FATAL ERROR ****" or displayed exactly as shown in this appendix.
WARNING AND ERROR MESSAGES Fatal Error Messages Internal error at P=%address Cause: This is a CROSSREF internal error. Recovery: If you get this error, contact your Tandem representative. Save all input and output files, and, if no LOG file was produced, record all commands issued prior to the error. Paging file error: error number Cause: CROSSREF encountered an error on one of its temporary files. The cause of the error depends on the exact error number listed.
WARNING AND ERROR MESSAGES Fatal Error Messages Unable to allocate memory; swap file error = error Cause: CROSSREF was unable to allocate the additional memory needed to complete the cross-reference. Recovery: The recovery action depends on the three-digit GUARDIAN error number listed in the error message. See the Operator Messages: Console Format for a description of the error message. Changing volumes with the SWAPVOL param might eliminate the problem.
INDEX Alphabet names COBOL85 7-2 COBOL85 compiler attribute 7-13 COBOL 74 6-2 COBOL 74 compiler attribute 6-13 SCREEN COBOL 11-2 Arrays FORTRAN 9-2 Attribute list 3-4 Attribute specifications displaying 4-41/44 list of CLASS 4-22, 4-25, 4-28/30, 4-35/36, 4-41/42 CPU 4-23, 4-25, 4-30, 4-36, 4-42 DEFINITIONS ONLY 4-23, 4-25, 4-30, 4-36, 4-42 DIRECTIVES 4-23, 4-25, 4-30, 4-36, 4-42 EXCLUDE 4-23, 4-31, 4-37, 4-42 INCLUDE 4-23, 4-31, 4-37, 4-42 LANGUAGE 4-23, 4-25, 4-31, 4-37, 4-42 LIBRARY 4-23, 4-26, 4-32, 4-3
INDEX BLOCKS identifier class FORTRAN 9-2 Pascal 10-2 C data types 5-2 default settings 5-2 identifier classes CONSTANTS 5-2 FUNCTIONS 5-2 MACROS 5-2 TYPES 5-2 VARIABLES 5-2 sample identifier listing 5-6/9 sample program 5-3/4 CLASS attribute specification displaying 4-41/42 restoring 4-22 saving 4-25 specifying SCAN command 4-28/30 SET command 4-35/36 Class names COBOL85 7-2 COBOL85 compiler attribute 7-13 COBOL85 compiler attributes alphabet-name 7-13 class-name 7-13 condition-name 7-13 data-name 7-14/15
INDEX VARIABLES 7-2 sample identifier listing 7-10/13 sample program 7-5/9 COBOL 74 compiler attributes alphabet-name 6-13 condition-name 6-13 data-name 6-14/15 file-name 6-15/16 index-name 6-16 literals 6-16 mnemonic-name 6-16 paragraph-name 6-17 section-name 6-17 compiler directives 6-3 data types 6-2 default settings 6-2 identifier classes CONDITIONS 6-2 FILES 6-2 FUNCTIONS 6-2 INDEXES 6-2 LITERALS 6-2 MNEMONICS 6-2 PROCEDURES 6-2 PROGLABELS 6-2 VARIABLES 6-2 sample identifier listing 6-10/13 sample pro
INDEX execution priority displaying 4-43 restoring 4-24 saving 4-26 specifying 4-32, 4-38 memory page setting displaying 4-43 restoring 4-23 saving 4-26 specifying 4-32, 4-38 program file setting displaying 4-43 restoring 4-24 saving 4-26 specifying 4-33, 4-39 Compiler-dependent mode 1-3 Condition names COBOL85 7-2 COBOL85 compiler attribute 7-13 COBOL 74 6-2 COBOL 74 compiler attribute 6-13 SCREEN COBOL 11-2 CONDITIONS identifier class COBOL85 7-2 COBOL 74 6-2 SCREEN COBOL 11-2 CONSTANTS identifier class
INDEX FC 4-11, A-2 GENERATE 4-12/13, A-2 HELP 4-14/15, A-2 LOG 4-16/17, A-2 OBEY 4-18/19, A-3 OUT 4-20/21, A-3 RESET 4-22/24, A-3/4 SAVE 4-25/27, A-4/5 SCAN 4-28/34, A-5-7 SET 4-35/40, A-7/9 SHOW 4-41/44, A-10/11 SYSTEM 4-45, A-11 VOLUME 4-46, A-11 summary of 4-1/2 CROSSREF output directing the output 4-12/13 format 3-1/7 Data BLOCKS TAL 12-2 Data names COBOL85 7-2 COBOL85 compiler attribute 7-14/15 COBOL 74 6-2 COBOL 74 compiler attribute 6-14/15 SCREEN COBOL 11-2 DEFINEs TAL 12-2 Definition reference 3-6
INDEX Editing commands 4-11 End-of-File character 2-3 command 2-3 Enumeration constants C 5-2 ENV command 4-6/7, A-1 Environment parameters displaying 4-6 setting LOG 4-16 SYSTEM 4-45 VOLUME 4-46 Error messages B-3/13 ERRORS command 4-8/9, A-1 EXCLUDE attribute specification 4-23, 4-31, 4-37, 4-42 EXCLUDE list adding identifiers to SCAN command 4-31 SET command 4-37 displaying 4-42 emptying 4-23 EXIT command 4-10, A-2 EXTENDED BASIC data types 8-2 default settings 8-2 identifier classes FUNCTIONS 8-2 KEYWO
INDEX File names COBOL85 7-2 COBOL85 compiler attribute 7-15/16 COBOL 74 6-2 COBOL 74 compiler attribute 6-15/16 FILES identifier class COBOL85 7-2 COBOL 74 6-2 FMTLABELS identifier class FORTRAN 9-2 FORTRAN data types 9-2 default settings 9-2 identifier classes BLOCKDATAS 9-2 BLOCKS 9-2 CONSTANTS 9-2 FMTLABELS 9-2 FUNCTIONS 9-2 INLINES 9-2 LITERALS 9-2 PROCEDURE PARAMS 9-2 PROCEDURES 9-2 PROGLABELS 9-2 SUBPROCS 9-2 VARIABLES 9-2 sample identifier listing 9-6/8 sample program 9-5 FUNCTION subprograms FORTR
INDEX CONSTANTS 4-22, 4-29, 4-35, 4-42 FILES 4-22, 4-29, 4-35, 4-42 FMTLABELS 4-22, 4-29, 4-35, 4-42 FUNCTIONS 4-22, 4-29, 4-35, 4-42 INDEXES 4-22, 4-29, 4-35, 4-42 INLINES 4-22, 4-29, 4-35, 4-42 KEYWORDS 4-22, 4-29, 4-35, 4-42 LINENOS 4-22, 4-29, 4-35, 4-42 MACROS 4-22, 4-29, 4-35, 4-42 MNEMONICS 4-22, 4-29, 4-35, 4-42 PROCEDURE PARAMS 4-22, 4-29, 4-35, 4-42 PROCEDURES 4-22, 4-29, 4-35, 4-42 PROGLABELS 4-22, 4-29, 4-35, 4-42 REGISTERS 4-22, 4-29, 4-35, 4-42 SCREENS 4-22, 4-29, 4-35, 4-42 SUBPROCS 4-22, 4-
INDEX Index names COBOL85 7-2 COBOL85 compiler attribute 7-16 COBOL 74 6-2 COBOL 74 compiler attribute 6-16 Index registers TAL USE statements 12-2 INDEXES identifier class COBOL85 7-2 COBOL 74 6-2 Inline functions FORTRAN 9-2 INLINES identifier class FORTRAN 9-2 Input file recording comments for input 4-5 Interactive mode 2-3 Invocation reference 3-6/7 KEYWORDS identifier class EXTENDED BASIC 8-2 LABELs TAL 12-2 Labels executable statements in FORTRAN 9-2 FORMAT statements in FORTRAN 9-2 LANGUAGE attribut
INDEX LITERALS identifier class COBOL85 7-2 COBOL 74 6-2 EXTENDED BASIC 8-2 FORTRAN 9-2 SCREEN COBOL 11-2 LOG command 4-16/17, A-2 MACROS identifier class C 5-2 TAL 12-2 MEM attribute specification displaying 4-43 restoring 4-23 saving 4-26 specifying SCAN command 4-32 SET command 4-38 Messages error B-3/10 fatal B-10/13 warning B-1/2 Miscellaneous references 3-6/7 Mnemonic names COBOL85 7-2 COBOL85 compiler attribute 7-17 COBOL 74 6-2 COBOL 74 compiler attribute 6-16 SCREEN COBOL 11-2 MNEMONICS identifier
INDEX OBEY command 4-18/19, A-3 OMIT attribute specification 4-23, 4-32, 4-38, 4-43 OMIT list adding files to SCAN command 4-32 SET command 4-38 displaying 4-43 emptying 4-23 OUT command 4-20/21, A-3 Output listing directing the output 4-12/13 format 3-1/7 Output listing file 4-20 Paragraph names COBOL85 7-2 COBOL85 compiler attribute 7-17 COBOL 74 6-2 COBOL 74 compiler attribute 6-17 SCREEN COBOL 11-2 Parameter reference 3-6/7 PARAMETERs FORTRAN 9-2 Pascal data types 10-2 default settings 10-2 identifier
INDEX PROCs TAL 12-2 PROGLABELS identifier class COBOL85 7-2 COBOL 74 6-2 FORTRAN 9-2 Pascal 10-2 SCREEN COBOL 11-2 TAL 12-2 PROGRAM attribute specification displaying 4-43 restoring 4-24 saving 4-26 specifying SCAN command 4-33 SET command 4-39 Program names COBOL85 7-2 COBOL85 compiler attribute 7-18 COBOL 74 6-2 SCREEN COBOL 11-2 Public variables Pascal 10-2 Read reference 3-6/7 Records FORTRAN 9-2 Reference codes blank 3-6/7 D 3-6/7 I 3-6/7 M 3-6/7 P 3-6/7 W 3-6/7 REGISTERS identifier class TAL 12-2 RE
INDEX SCREEN COBOL data types 11-2 default settings 11-2 identifier classes CONDITIONS 11-2 LITERALS 11-2 MNEMONICS 11-2 PROCEDURES 11-2 PROGLABELS 11-2 SCREENS 11-2 VARIABLES 11-2 sample identifier listing 11-9/12 sample program 11-4/8 Screen names SCREEN COBOL 11-2 SCREENS identifier class SCREEN COBOL 11-2 Section names COBOL85 7-2 COBOL85 compiler attribute 7-18 COBOL 74 6-2 COBOL 74 compiler attribute 6-17 SCREEN COBOL 11-2 SET command 4-35/40, A-7/9 SHOW command 4-41/44, A-10/11 Statement functions F
INDEX identifier classes BLOCKDATAS 12-2 CONSTANTS 12-2 MACROS 12-2 PROCEDURE PARAMS 12-2 PROCEDURES 12-2 PROGLABELS 12-2 REGISTERS 12-2 SUBPROCS 12-2 TYPES 12-2 VARIABLES 12-2 sample identifier listing sample program 12-5 TYPES identifier class C 5-2 Pascal 10-2 TAL 12-2 Unnamed constants FORTRAN 9-2 UNREF attribute specification displaying 4-43 restoring 4-24 saving 4-26 specifying SCAN command 4-33 SET command 4-39 Variables FORTRAN 9-2 VARIABLES identifier class C 5-2 COBOL85 7-2 COBOL 74 6-2 EXTENDED