COB85XL


COB85XL


Compiles an HP COBOL II/iX program using the 1985 ANSI
standard entry point and creates an object file. HP COBOL
II/iX is not part of the 900 Series HP 3000 computer system
fundamental operating software and must be purchased separately.

SYNTAX

     COB85XL [TEXTFILE][,[OBJECTFILE][,[LISTFILE][,[MASTERFILE][,NEWFILE]]]]
[;INFO=QUOTEDSTRING]
[;WKSP=WORKSPACENAME]
[;XDB=XDBFILENAME]

PARAMETERS

TEXTFILE            THE NAME OF THE FILE THAT CONTAINS THE SOURCE CODE
THAT IS TO BE COMPILED. THIS CAN BE ANY ASCII OR
TOOLSET ACCESS METHOD (TSAM) FILE THAT YOU PREPARE
WITH AN EDITOR SUCH AS EDIT/V. THE FORMAL FILE
DESIGNATOR IS COBTEXT.

IF YOU ARE RUNNING HP COBOL II/iX FROM YOUR
TERMINAL, YOU WILL PROBABLY SPECIFY A DISK TEXTFILE.
IF YOU DO NOT SPECIFY TEXTFILE, THE DEFAULT FILE IS
$STDIN. $STDIN IS THE CURRENT INPUT DEVICE, USUALLY
YOUR TERMINAL.

OBJECTFILE ACTUAL FILE DESIGNATOR OF THE OBJECT FILE, WHICH IS
THE OUTPUT OF THE COMPILER. THIS FILE IS STORED IN
BINARY FORM AND HAS A FILE CODE OF EITHER NMOBJ
(1461) OR NMRL (1033). ITS FORMAL FILE DESIGNATOR
IS COBOBJ. IF THE OBJECT FILE PARAMETER IS OMITTED,
THE OBJECT CODE IS SAVED TO THE TEMPORARY FILE
$OLDPASS, IF IT EXISTS; OTHERWISE IT IS SAVED
$NEWPASS, WHICH THEN BECOMES THE NEW $OLDPASS.

IF YOU SPECIFY OBJECTFILE, THE COMPILER
STORES THE OBJECT FILE IN A PERMANENT FILE OF
THE CORRECT SIZE AND TYPE, WITH THE NAME YOU SPECIFIED.

IF A FILE OF THE SAME NAME, OR THE DEFAULT
FILE $OLDPASS, ALREADY EXISTS, THE NEW OBJECT
CODE OVERWRITES THE OLD, IF THE FILE CODE IS
NMOBJ; OR IT IS APPENDED TO THE OLD FILE IF THE
FILE CODE IS NMRL. FOR NMRLS, ANY EXISTING
VERSIONS OF CODE MODULES ARE FIRST PURGED.

THE FUNCTIONALITY OF NMRLS CLOSELY MAPS TO
THE MPE V USLS. SEE THE PROGRAMMER'S GUIDE
FOR THE COMMANDS RLINIT AND RLFILE THAT CAUSE
THE CREATION OF NMRLS BY DEFAULT OR INITIALIZATION.

THE COMPILER MAY ISSUE AN ERROR MESSAGE
TELLING YOU THAT A NEW OR EXISTING OBJECT
FILE IS TOO SMALL TO CONTAIN THE COMPILER'S
OUTPUT OR NUMBER OF MODULES. IN THAT CASE,
YOU MUST BUILD A LARGER FILE OR USE THE LINK
EDITOR TO CLEANRL THE NMRL. YOU MAY
RECOMPILE TO THE NEW FILE.

YOU MAY USE THE MPE/iX SAVE COMMAND TO STORE
$OLDPASS AS A PERMANENT FILE UNDER ANOTHER NAME.

LISTFILE THE NAME OF THE FILE TO WHICH THE COMPILER WRITES
THE LISTING. THIS CAN BE ANY ASCII FILE. THE
FORMAL FILE DESIGNATOR IS COBLIST. IF YOU DO NOT
SPECIFY LISTFILE, THE DEFAULT IS $STDLIST. $STDLIST
IS USUALLY THE TERMINAL IN A SESSION OR THE PRINTER
IN A BATCH JOB.

MASTERFILE ACTUAL FILE DESIGNATOR OF THE MASTER FILE WITH WHICH
TEXTFILE IS MERGED TO PRODUCE A COMPOSITE SOURCE.
THIS CAN BE ANY ASCII INPUT FILE. THE FORMAL
DESIGNATOR IS COBMAST. DEFAULT IS THAT THE MASTER
FILE IS NOT READ; INPUT IS READ FROM TEXTFILE, OR
FROM $STDIN IF TEXTFILE IS NOT SPECIFIED.

NEWFILE ACTUAL FILE DESIGNATOR OF THE MERGED TEXTFILE AND
MASTERFILE. THIS CAN BE ANY ASCII OUTPUT FILE.
FORMAL FILE DESIGNATOR IS COBNEW. DEFAULT IS THAT
NO FILE IS WRITTEN.

QUOTEDSTRING A PARAMETER SPECIFYING COMPILE TIME OPTIONS FOR THE
COMPILER. IT IS A QUOTED STRING OF NO MORE THAN 255
CHARACTERS (INCLUDING THE SINGLE OR DOUBLE QUOTE
MARKS THAT ENCLOSE IT).

THE QUOTEDSTRING STRING MAY BE USED TO PASS $
(DOLLAR SIGN) COMMANDS TO THE COMPILER
"$COMMAND1$COMMAND2$COMMAND3...." THE $ MUST BE THE
FIRST CHARACTER IN THE STRING, AND IT MUST BE USED
TO SEPARATE MULTIPLE COMMANDS. YOU MAY EXTEND THE
QUOTEDSTRING STRING OVER MORE THAN ONE PHYSICAL LINE
BY MAKING AN AMPERSAND (&) THE LAST CHARACTER OF ONE
LINE AND CONTINUING THE QUOTEDSTRING STRING ONTO THE
NEXT PHYSICAL LINE. EACH $ COMMAND IS LIMITED IN
LENGTH TO THE SAME SIZE AS IN THE SOURCE FILE.

COB85XL SALARIES,SALOBJ;INFO="$CONTROL &
BOUNDS,MAP,VERBS$SET &$X9=ON"
COB85XL ACCOUNTS;INFO="$DEFINE %A=5#"

WORKSPACENAME THIS PARAMETER IS THE ACTUAL FILE DESIGNATOR OF AN
HPTOOLSET WORKSPACE. THE FORMAL FILE DESIGNATOR IS COBWKSP.

XDBFILENAME ACTUAL FILE DESIGNATOR FOR THE FILE TO BE USED BY
XDB. THIS WILL BE A PERMANENT FILE CREATED BY THE
COMPILER THAT CONTAINS THE LISTING OF THE SOURCE
FILES. THE FORMAL FILE DESIGNATOR IS COBXDB.

IF THIS FILE EXISTS, IT MUST BE IN A SPECIAL
FORMAT CREATED BY A PREVIOUS COMPILE USING
THIS OPTION. IN THIS CASE, IT IS FIRST
PURGED. IF THE FILE IS OF THE WRONG TYPE,
THE COMPILE IS NOT ATTEMPTED. THE USER MUST
THEN USE A DIFFERENT NAME OR PURGE THE FILE.

ONCE THE FILE IS CREATED, XDB EXPECTS THE
FULLY QUALIFIED NAME OF THE FILE TO BE
UNCHANGED. A FILE EQUATION COULD BE USED IF
THE FILE IS RENAMED.

THE PRESENCE OF THIS PARAMETER ALSO INVOKES
THE SYMDEBUG OPTION.

NOTE

THE FORMAL FILE DESIGNATORS USED IN THIS COMMAND (COBTEXT, COBOBJ,
COBLIST, COBMAST, COBNEW, AND COBWKSP, COBXDB) CANNOT BE BACKREFERENCED
AS ACTUAL FILE DESIGNATORS IN THE COMMAND PARAMETER LIST. FOR FURTHER
INFORMATION, REFER TO THE IMPLICIT SUBENTRY OF THE FILE ENTRY IN THE
HELP FACILITY.

OPERATION

     THE COB85XL COMMAND COMPILES AN HP COBOL II/iX PROGRAM INTO
AN OBJECT FILE ON DISK. IF YOU DO NOT SPECIFY TEXTFILE, HP
COBOL II/iX EXPECTS THE SOURCE TEXT TO BE ENTERED FROM YOUR
STANDARD INPUT DEVICE. IF YOU DO NOT SPECIFY LISTFILE, HP
COBOL II/iX SENDS THE PROGRAM LISTING TO THE CURRENT LIST DEVICE.

THIS COMMAND IS RECOGNIZED ONLY IF HP COBOL II/iX IS INSTALLED
ON YOUR SYSTEM. THIS COMMAND MAY BE ISSUED FROM A SESSION OR A
JOB, BUT NOT IN BREAK OR FROM A PROGRAM. PRESSING [BREAK]
SUSPENDS THE EXECUTION OF THIS COMMAND. ENTERING RESUME
CONTINUES THE EXECUTION.

NOTE

THIS COMMAND IS IMPLEMENTED AS A COMMAND FILE. IF YOU SET THE HPPATH
VARIABLE TO NULL (SETVAR HPPATH ""), THE COMMAND FILE WILL NOT BE
EXECUTED, AND THE COMMAND WILL FAIL.

NOTE

     PROGRAM DEVELOPMENT IN THE NATIVE MODE OF MPE/iX USES THE
NEW LINK COMMAND IN PLACE OF THE MPE V/E PREP COMMAND.
THIS PRODUCES A SIGNIFICANT CHANGE IN THE METHOD OF LINKING
CODE THAT YOU MUST TAKE INTO ACCOUNT.

EXAMPLE(S)

     TO COMPILE AN HP COBOL II/iX PROGRAM STORED IN THE FILE
SOURCE INTO AN OBJECT FILE CALLED OBJECT AND SEND THE
LISTING TO THE DISK FILE LISTFL, ENTER

COB85XL SOURCE,OBJECT,LISTFL

IF YOU HAVE CREATED A PROGRAM CALLED MAIN AND A SUBPROGRAM
CALLED SUB, EACH CONTAINED IN A SEPARATE FILE, YOU MIGHT
CHOOSE TO HANDLE IT THIS WAY IN MPE V/E

COBOLII MAIN, SOMEUSL
COBOLII SUB, SOMEUSL

PREP SOMEUSL, SOMEPROG

RUN SOMEPROG

THE SECOND COMMAND APPENDS THE CODE FROM SUB TO SOMEUSL.

HOWEVER, LINK (IN MPE/iX NATIVE MODE) DOES NOT APPEND SUB.
ON MPE/iX, YOU MUST COMPILE THE SOURCE FILES INTO SEPARATE
OBJECT FILES AND THEN USE THE LINKEDITOR TO LINK THE TWO
OBJECT FILES INTO THE PROGRAM FILE, AS IN THIS EXAMPLE

COB85XL MAIN, OBJMAIN
COB85XL SUB, OBJSUB

LINK FROM=OBJMAIN,OBJSUB;TO=SOMEPROG

RUN SOMEPROG

ON THE OTHER HAND, IF NMRLS ARE USED INSTEAD OF NMOBJS,
THE ABOVE CAN BE SIMPLIFIED TO THE FOLLOWING:

BUILD RLFILE;DISC=10000;CODE=NMRL
COB85XL MAIN, RLFILE
COB85XL SUB, RLFILE
LINK RLFILE, SOMEPROG
RUN SOMEPROG

ADDITIONAL INFORMATION

COMMANDS:   COB85XLG, COB85XLK, LINK

MANUALS :   HP COBOL II/XL REFERENCE MANUAL (31500-90001)
            HP COBOL II/XL PROGRAMMER'S GUIDE (31500-90002)
            HP Link Editor/iX Reference Manual (32650-90030)