Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 4  Command List II

Commands CALC thru COPY

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

CALC

Evaluates an expression. (Native Mode)

Syntax

CALC expression

NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" in chapter 2 "Command Structure Defined".

Parameters

expression

The expression to be evaluated.

Operation Notes

The CALC command evaluates expression and displays the result to $STDLIST. Expressions can yield integer, string, or Boolean results. Integer results are displayed in decimal, hexadecimal ($ prefix), and octal (% prefix) notations. Boolean expressions are displayed as TRUE or FALSE. The variable HPRESULT is set to the result of the last expression evaluated by CALC. The type of HPRESULT changes depending on the type of result generated by CALC.

Table 4-1 “Logical Operators - The CALC Command” lists some of the logical operators for the CALC command. Enter :HELP expressions for more information

Table 4-1 Logical Operators - The CALC Command

Logical operators:AND, OR, XOR, NOT
Boolean functions and values:BOUND, TRUE, FALSE, ALPHA, ALPHANUM, NUMERIC, ODD
Comparison operators:=, <>, <, >, <=, >=
Bit manipulation operators:LSL, LSR, CSR, CSL, BAND, BOR, BXOR, BNOT
Arithmetic operators:MOD, ABS, * , / , + , -, ^ (exponentiation)
Functions returning strings:CHR, DWNS, UPS, HEX, OCTAL, INPUT, LFT, RHT, RPT, LTRIM, RTRIM, STR
Functions returning integers:ABS, LEN, MAX, MIN, ORD, POS, TYPEOF
Other functions:FINFO, SETVAR

 

The operands you may use are any variable, integer, string, Boolean constant, or the system-reserved words WARN, FATAL, SYSTEM, and OK. You may form compound logical expressions using the AND, NOT, XOR, and OR logical operators, optionally nested within parentheses.

Do not use the FINFO function with the CALC command for remote files. It ignores their existence and returns incorrect information.

Use

This command is available in a session, job, program, or in BREAK. Pressing Break terminates the INPUT( ) function.

Example

The result of CALC sample depends on the value entered for sample and on the type of the value, as shown in Table 4-2 “Results of CALC”

Table 4-2 Results of CALC

sampleDisplayed (HPRESULT)Type
5*10-743, $2B, %53Integer
LEN("abc")3, $3, %3Integer
UPS("Abc")ABCString
1=1TRUEBoolean
MAX(1,0,abs(-12),10)12, $c, %14Integer

 

Related Information

Commands

DELETEVAR, ELSEIF, IF, SETJCW, SETVAR, SHOWJCW, SHOWVAR, WHILE

Manuals

Appendix B, "Expression Evaluator Functions"

Command Interpreter Access and Variables Programmer's Guide

CCXL

Compiles an HP C/iX program. HP C/iX is not part of the HP 3000 Series 900 Computer System Fundamental Operating Software and must be purchased separately. This command is recognized only if HP C/iX is installed on your system. (Native Mode)

Syntax

CCXL [textfile] [,[objectfile] [,[listfile]]] [;INFO=quotedstring]

NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.

Parameters

textfile

The name of the text file that contains the source code to be compiled. This is an ASCII file that you prepare with an editor such as EDIT/3000. The formal file designator is CCTEXT.

If you are running HP C/iX from your terminal, you will probably specify a disk textfile. If you do not specify textfile, then the default file is $STDIN. $STDIN is the current input device, usually your terminal.

When textfile is your terminal, you can enter source code interactively. When you have entered all the source code, type a colon (:) to end the interactive input.

objectfile

Actual file designator of the object file to which the object code is stored. This file is in binary form and has a file code of 1461 or NMOBJ. Its formal file designator is CCOBJ. If the objectfile parameter is omitted, the object code is saved to the temporary file $OLDPASS.

If you specify objectfile, the compiler stores the object file in a permanent file of the correct size, type, and name you specified. If a file of the same name already exists, the object code overwrites that file.

If the compiler issues an error message telling you that a new or existing object file to which you are trying to compile is too small, build a larger object file and recompile to it.

You may use the MPE/iX SAVE command to store $OLDPASS as a permanent file under another name.

listfile

The name of the file on which the compiler writes the program listing. It can be any ASCII file. The default is $STDLIST.$STDLIST is usually the terminal from a session or the printer from a batch job. The formal file designator is CCLIST.

If listfile is $NULL or a file other than $STDLIST, the compiler displays on $STDLIST those lines that contain errors.

quotedstring

A string of no more than 1024 characters (including the single or double quotation marks that enclose it).

The quotedstring is used to pass initial compiler options to the compiler program. Options must be delimited by blank spaces.

NOTE: The formal file designators used in this command (CCTEXT, CCOBJ, and CCLIST) cannot be backreferenced as actual file designators in the command parameter list.

Operation Notes

The CCXL command compiles an HP C/iX program and stores the object code in a permanent file (objectfile) or in $OLDPASS if you do not specify an object file. If textfile is not specified, the compiler expects the source program to be entered from your standard input device. If you do not specify listfile, the compiler sends the program listing to your standard device and identifies it by the formal file designator CCLIST.

NOTE: This command is implemented as a command file. If you set the HPPATH variable to null (SETVAR HP PATH ""), the command file is not executed, and the command fails.

Use

This command may be issued from a session, job, or program. It may not be used in BREAK. Pressing Break suspends the execution of this command. Entering the RESUME command continues the execution.

Examples

The following example compiles an HP C/iX program entered from your standard input device and stores the object program in the object file $OLDPASS. The listing is then sent to your standard list device.

  CCXL

The next example compiles an HP C/iX program contained in the disk file SOURCE and stores the object program in the object file OBJECT. The program listing is stored in the disk file LISTFILE.

  CCXL SOURCE,OBJECT,LISTFILE

Program development in native mode uses the MPE/iX LINK command, not the MPE V/E PREP command. This produces a significant change in the method of linking code. In MPE/iX, you must compile the source files into separate object files and then use the Link Editor to link the two object files into the program file, as in this example:

  CCXL MAIN, OBJMAIN
CCXL SUB, OBJSUB
LINK FROM=OBJMAIN,OBJSUB;TO=SOMEPROG;RL=LIBCINIT.LIB.SYS
RUN SOMEPROG

Related Information

Commands

CCXLGO, CCXLLK, RUN, LINK, XEQ, LINKEDIT Utility

Manuals

HP C Programmer's Guide

CCXLGO

Compiles, links, and executes an HP C/iX program. HP C/iX is not part of the HP 3000 Series 900 Computer System Fundamental Operating Software and must be purchased separately. This command is recognized only if HP C/iX is installed on your system. (Native Mode)

Syntax

CCXLGO [textfile] [,[listfile]] [;INFO=quotedstring]

NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.

Parameters

textfile

The name of the text file that contains the source code to be compiled. This is an ASCII file that you prepare with an editor such as EDIT/3000. The formal file designator is CCTEXT.

If you are running HP C/iX from your terminal, you will probably specify a disk textfile. If you do not specify textfile, then the default file is $STDIN. $STDIN is the current input device, usually your terminal.

When textfile is your terminal, you can enter source code interactively. When you have entered all the source code, type a colon (:) to end interactive input.

listfile

The name of the file on which the compiler writes the program listing. It can be any ASCII file. The default is $STDLIST. $STDLIST is usually the terminal from a session or the printer from a batch job. The formal file designator is CCLIST.

If listfile is $NULL or a file other than $STDLIST, the compiler displays on $STDLIST those lines that contain errors.

quotedstring

A quoted string of no more than 1024 characters (including the single or double quotation marks that enclose it).

The quotedstring is used to pass initial compiler options to the compiler. Options must be delimited by blank spaces.

NOTE: The formal file designators used in this command (CCTEXT and CCLIST) cannot be backreferenced as actual file designators in the command parameter list.

Operation Notes

The CCXLGO command compiles, links, and executes an HP C/iX program. If textfile is omitted, the compiler expects input from your standard input device. If you do not specify listfile, the compiler sends the program listing to the formal file designator CCLIST (default is $STDLIST).

The object file created during compilation is a system-defined temporary file, $NEWPASS, which is passed directly to the Link Editor as $OLDPASS. The Link Editor purges the object file and writes the linked program to $OLDPASS, which is then executed and may be executed repeatedly.

NOTE: This command is implemented as a command file. If you set the HPPATH variable to null (SETVAR HPPATH ""), the command file is not executed, and the command fails.

Use

This command may be issued from a session, job, or program. It may not be used in BREAK. Pressing Break suspends the execution of this command. Entering the RESUME command continues the execution.

Examples

To compile, link, and execute an HP C/iX program entered from your standard input device, with the program listing sent to your standard list device, enter:

 CCXLGO

To compile, link, and execute an HP C/iX program from the disk file SOURCE and send the program listing to the file LISTFILE, enter:

 CCXLGO SOURCE,LISTFILE

Related Information

Commands

CCXL, CCXLLK, RUN, LINK, XEQ, LINKEDIT Utility

Manuals

HP C Programmer's Guide

CCXLLK

Compiles and links an HP C/iX program. HP C/iX is not part of the HP 3000 Series 900 Computer System Fundamental Operating Software and must be purchased separately. This command is recognized only if HP C/iX is installed on your system. (Native Mode)

Syntax

CCXLLK [textfile] [,[ [progfile]] [,[listfile]]] [;INFO=quotedstring]

NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.

Parameters

textfile

The name of the text file that contains the source code to be compiled. This is an ASCII file that you prepare with an editor such as EDIT/3000. The formal file designator is CCTEXT.

If you are running HP C/iX from your terminal, you will probably specify a disk textfile. If you do not specify textfile, then the default file is $STDIN. $STDIN is the current input device, usually your terminal. When textfile is your terminal, you can enter source code interactively. When you have entered all the source code, type a colon (:) to end the interactive input.

progfile

The name of the program file on which the MPE/iX linker writes the linked program. If you omit the progfile parameter, the program is saved to the temporary file $OLDPASS.

listfile

The name of the file on which the compiler writes the program listing. It can be any ASCII file. The default is $STDLIST. $STDLIST is usually the terminal from a session or the printer from a batch job. The formal file designator is CCLIST.

If listfile is $NULL or a file other than $STDLIST, the compiler displays on $STDLIST those lines that contain errors.

quotedstring

A string of no more than 1024 characters (including the single or double quotation marks that enclose it).

The quotedstring is used to pass initial compiler options to the compiler. Options must be delimited by blank spaces. For a list of options, refer to the HP C/iX Reference Manual (31506-90005).

NOTE: The formal file designators used in this command (CCTEXT and CCLIST) cannot be backreferenced as actual file designators in the command parameter list.

Operation Notes

The CCXLLK command compiles and links an HP C/iX program into a file on disk. If you do not specify textfile, the compiler expects input from the current input device. If you do not specify listfile, the compiler sends the listing output to the formal file designator CCLIST (default $STDLIST).

The object file created during compilation is a system-defined temporary file, $NEWPASS, which is passed directly to the Link Editor as $OLDPASS. Link Editor overwrites progfile and writes the linked program to $OLDPASS, if progfile is omitted, which can then be executed.

NOTE: This command is implemented as a command file. If you set the HPPATH variable to null (SETVAR HPPATH ""), the command file is not executed, and the command fails.

Use

This command may be issued from a session, job, or program. It may not be used in BREAK. Pressing Break suspends the execution of this command. Entering the RESUME command continues the execution.

Examples

The following example compiles and links an HP C/iX program entered through your standard input device and stores the linked program in the file $OLDPASS. The listing is printed on your standard list device:

 CCXLLK

To compile and link an HP C/iX source program from the source file SOURCE, store it in PROG, and send the listing to your standard list device, enter:

 CCXLLK SOURCE,PROG

Related Information

Commands

CCXL, CCXLGO, RUN, LINK, XEQ, LINKEDIT Utility

Manuals

HP C Programmer's Guide

HP C/iX Reference Manual

CHANGELOG

Changes the user logging file without stopping or interrupting the logging process.

Syntax

CHANGELOG logid [;DEV=device]

Parameters

logid

Name of the currently active user logging process. This name may contain from one to eight alphanumeric characters, beginning with an alphabetic character.

device

Name of the device on which the new logging file is to be created. The device may be either DISC or TAPE. Default is DISC.

Operation Notes

This command permits the user to change the active logging file without stopping the logging process with the LOG logid, STOP command. By specifying a device, you may switch the logging file from one device to another, regardless of the device on which the logging file was created. If you enable automatic logging with the ALTLOG or GETLOG command, however, the only device available for logging is the default, DISC.

If a log file is restricted to a single volume or volume class when it is created with the BUILD command, then successive log files created by User Logging will have the same restriction.

If the CHANGELOG command is valid, the system writes a changelog record to the end of the current logging file and closes the file. It then opens a new logging file whose characteristics are identical to those of the preceding file and makes the new file permanent. If the system is unable to open a new file of the same size, it tries to open a new file half the size of the old file. It repeats this process until a new file is opened successfully, or until the size is less than 256 records. In the second case, user logging terminates.

If the system opens a new log file, it immediately writes a changelog record to the new file. The changelog record posted to the old logging file contains the fully qualified identifier of the new logging file. A corresponding changelog record written to the new file contains the fully qualified identifier of the old logging file. Changelog records also contain the device type of the logging file to which the changelog refers.

The following message is displayed on the $STDLIST to confirm a successful change:

 Log file for logid AAA has been changed from 
A001.PUB.SYS to A002.PUB.SYS (ulogmsg 38)

If the new logging file is a serial file, a message advising the operator to mount the new log file appears on the console:

 Mount new tape volume for changelog of logid AAA
(ulogmsg 40).

Normally when a user logging file is full, the system terminates the logging process and displays an appropriate message.

However, by specifying the AUTO parameter in a GETLOG or ALTLOG command, you enable an automatic CHANGELOG, thereby eliminating the need to issue the CHANGELOG command manually. Refer to the ALTLOG and GETLOG commands in this chapter.

To use CHANGELOG (manually or automatically), end the first user logging file name with the numeric characters 001 (for example, fname001). This establishes a naming convention that works in conjunction with the file set number to generate sequential file names independently. New file names consist of the file name root (fname) plus the next sequential increment of the last three digits:

 Current File         Next File
TEST001 TEST002
TEST002 TEST003
... ...
TEST998 TEST999
TEST999 TEST000

The logging process opens files, and automatically names them with the next sequential number, up to a maximum of 999. Thereafter, the numbering sequence resets to 000 and begins incrementing all over again.

Automatic logging with the CHANGELOG command is available only for disk files.

NOTE: The logging process specified by logid must be in an ACTIVE state. If the logging process is in any other state, such as RECOVERING, STOP, INITIALIZING, or if the logging process has another CHANGELOG pending, the command terminates in an error state. The ALTLOG command permits changing the log file for an inactive logging process. ALTLOG, however, does not provide a way to link log files into a set.

Use

This command may be issued from a session, job, program, or in BREAK. Pressing Break has no effect on this command.

You must be the logid creator or have system manager (SM) or system supervisor (OP) capability to use the CHANGELOG command. User logging (LG) capability is also required.

Example

If you are running a logging process with a logid of KATHY, logging to logfile KLOG001, and you want to close the current logfile and log to a new logfile, KLOG002, without interrupting the logging process, enter:

 CHANGELOG KATHY

Related Information

Commands

ALTLOG, GETLOG, LISTLOG, LOG, OPENLOG, RELLOG, SHOWLOG, SHOWLOGSTATUS

Manuals

User Logging Programmer's Guide

CHDIR

Changes the process' current working directory (CWD). (Native Mode)

Syntax

CHDIR [ [DIR=]dir_name] [;SHOW | NOSHOW]

Parameters

dir_name

The name of the directory you want to change to, which is assumed to be an MPE name unless you specify otherwise. To change to an HFS-named directory, begin dir_name with a dot (.) or a slash (/). The dir_name may not end in a slash, and using wildcards is not allowed.

This parameter is optional. If you omit dir_name, CHDIR switches you to your logon directory, which is your logon group in the form /LOGON_ACCOUNT/LOGON_GROUP in all uppercase letters.

SHOW

Displays the absolute pathname of the new directory on $STDLIST. SHOW is the default.

NOSHOW

Does not display the absolute pathname.

Operation

The CHDIR command changes the process' current working directory to dir_name or to the logon group, if you omit dir_name. You can change the CWD to any HFS directory if you precede dir_name with a dot (.) or a slash (/) or to an MPE account or group to which you have the appropriate permission.

Issuing the CHDIR command does not give users access to files in a directory (or group and account) that they would not otherwise have. That is, it has no affect on file access permissions.

The CWD is a process-local attribute, which means that CHDIR changes the CI's CWD for the life of that CI process or until another CHDIR command is issued. When CHDIR is executed programmatically from a child process of the CI (e.g., HPEDIT), only that process' CWD is changed; the CWD of the parent process (in this example, the CI) remains the same.

CHDIR does not post any accounting information: Connect and CPU time are still accounted to the user's logon account and group.

HPCWD is a read-only, CI string variable that contains the name of the current working directory in HFS syntax. At logon, HPCWD contains /account_name/logon_group_name. The CHGROUP command causes the HPCWD variable to be set to /account/group_changed_to.

The following table summarizes the differences and similarities between the CHDIR and CHGROUP commands.

Table 4-3 CHGROUP vs. CHDIR command

AffectsCHGROUPCHDIR
Accumulation of CPU and Connect timesyesno
Set of accessible filesyesno
CWD of processyesyes
HPCWD variableyesyes
Disk space accumulationyesno

 

Use

The CHDIR command may be invoked from a job, a session, a program, or in Break. Pressing Break has no effect on this command. You must have traverse directory entries (TD) permission to each directory component in dir_name (refer to the ALTSEC command in this chapter for more information on directory permissions.) The CWD is not changed if the CHDIR command fails.

Examples

The following example shows the command entry to change to the directory dir1 in the MYGRP group in the MYACCT account.

 CHDIR /MYACCT/MYGRP/dir1

The following example shows the command entry to change to the MPE group level (AGROUP) in the MYACCT account.

 CHDIR /MYACCT/AGROUP

The following example shows the command entry to change to a directory named My_dir. In this example, My_dir is a relative pathname and it is subdirectory in the current working directory (CWD).

 CHDIR ./My_dir

The following example shows the command entry to change to a directory named john, in the group JONES, in the account MYACCT, by specifying the full pathname.

 CHDIR /MYACCT/JONES/john

In the following example, a change is made to a directory named final by specifying the relative pathname. The variable HPCWD displays the current working directory after the change is made.

 CHDIR ./es/final
SHOWVAR HPCWD

HPCWD = /MYACCT/JONES/john/es/final

Related Information

Commands

CHGROUP, FINDDIR (UDC), LISTFILE, LISTDIR (UDC), NEWDIR, PURGEDIR

Manuals

Performing System Management Tasks

CHGROUP

Switches you from the current group to another group within the logon account to which you are allowed access. (Native Mode)

Syntax

CHGROUP [ [groupname] [/grouppass]]

NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.

Parameters

groupname

The name of the group to which the user is switched. If the parameter is omitted, the user is switched to the home group.

grouppass

The password of the group you are switching to, if it is assigned a password. In a session, if the target group has a password and you fail to supply one on the command line, MPE/iX will prompt you to enter one. You have three tries to enter the correct password before the command fails.

In a batch job, if the target group has a password and you fail to supply one, MPE/iX issues an error message "INCORRECT PASSWORD (CIERR 1441)" and the job fails.

In either case, when you switch to your home group, you may omit the password.

Operation Notes

This command changes the user's current group to groupname. The entire command interpreter environment is preserved (temporary files, file equations, cataloged UDCs, and variables). The user must know the password, if any, for groupname. In a session, if a password is associated with groupname, and the user fails to supply a grouppass, the system prompts the user to enter one. In a job, if a password is associated with groupname, and the user fails to supply a grouppass, the error message INCORRECT PASSWORD (CIERR 1441) is issued and the job fails.

The CHGROUP and CHDIR commands both change their process' CWD. However, CHDIR does not post any accounting information, and CHGROUP affects the CWD of every process in the job/session structure. Connect and CPU times are still accounted to the user's logon account and logon group.

Use

This command is available in a session or a job, but not in BREAK or from a program. Pressing Break has no effect on this command.

Examples

To switch the user from the current group to the group called GORODA, enter:

 CHGROUP GORODA

To switch the user from the current group to the group called GORODA, with the assigned password MUSASHI, enter:

 CHGROUP GORODA/MUSASHI

To switch the user from the current group to the user's home group, enter:

 CHGROUP

Related Information

Commands

CHDIR, HELLO

Manuals

None

COB74XL

Compiles an HP COBOL II/iX program using the 1974 ANSI standard entry point and creates an object file. HP COBOL II/iX is not part of the HP 3000 Series 900 Computer System Fundamental Operating Software and must be purchased separately. This command is recognized only if HP COBOL II/iX is installed on your system. (Native Mode)

Syntax

COB74XL [textfule]
[,[objectfile][ ,[listfile][,[masterfile][,newfile]]]]
[;INFO=quotedstring][ ;WKSP=workspacename]
[ ;XDB=xdbfilename]
NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.

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 objectfile parameter is omitted, the object code is saved to the temporary file $OLDPASS, if it exists, or to $NEWPASS, which then becomes $OLDPASS.

If you specify objectfile, the compiler stores the object file in a permanent file of the correct size, type, and name you specified.

If either 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 is appended to the old if the file code is NMRL. If the file code is NMRL, any existing version of the code module is first purged.

The functionality of NMRLS closely maps to the MPE/V USLS. Refer to the HP COBOL/XL Programmer's Guide (31500-90002) for information on the RLINIT and RLFILE commands that cause creation of an NMRL 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 clean the NMRL. You may then 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 program 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 the masterfile. This can be any ASCII output file. Formal file designator is COBNEW. Default is that no file is written.

quotedstring

A quoted string of no more than 255 characters, including the single or double quotation marks that enclose it, that specifies compile time options.

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. To extend the quotedstring string over more than one physical line make an ampersand (&) the last character of one line and continue the quotedstring string onto the next physical line. Each $ command is limited in length to the same size as in the source file:

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

Actual file designator of an HPToolset workspace. The formal designator is COBWKSP.

xdbfilename

Actual file designator for the file to be used by the symbolic debugger (XDB). This is 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, then 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 either 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.

Operation Notes

The COB74XL 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 your input from your standard input device. If you do not specify listfile, HP COBOL II/iX sends the program listing to the current list device.

You cannot backreference the formal file designators used in this command (COBTEXT, COBOBJ, COBLIST, COBMAST, COBNEW, COBWKSP, and COBXDB) as actual file designators in the command parameter list. For further information, refer to the "Implicit FILE Commands for Subsystems" discussion of the FILE command.

NOTE: This command is recognized only if HP COBOL II/iX is installed on your system. This command is implemented as a command file. If you set the HPPATH variable to null (SETVAR HPPATH ""), the command file is not executed, and the command fails.

Use

This command may be issued from a session, job, or program but not in BREAK. Pressing Break suspends the execution of this command. Entering the RESUME command continues the execution.

Examples

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:

 COB74XL SOURCE,OBJECT,LISTFL

Program development in native mode uses the MPE/iX LINK command, not the MPE V/E PREP command. This produces a significant change in the method of compiling code. For example, if you have created a program called MAIN and a subprogram called SUB, each contained in a separate file, you might choose to append the code from SUB to SOMEUSL in MPE V/E, like this:

  COBOLII MAIN, SOMEUSL
COBOLII SUB, SOMEUSL
PREP SOMEUSL, SOMEPROG
RUN SOMEPROG

However, the LINK command (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 Link Editor to link the two object files into the program file, as in this example:

  COB74XL MAIN, OBJMAIN
COB74XL SUB, OBJSUB
LINK FROM=OBJMAIN,OBJSUB;TO=SOMEPROG
RUN SOMEPROG

On the other hand, if an NMRL is used instead of an NMOBJ, the above can be simplified to the following:

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

Related Information

Commands

COB74XLG, COB74XLK, LINK, RUN, XEQ, LINKEDIT Utility

Manuals

HP COBOL II/XL Reference Manual

HP COBOL II/XL Programmer's Guide

HP Link Editor/iX Reference Manual

COB74XLG

Compiles, links, and executes an HP COBOL II/iX program using the ANSI 1974 standard entry point. HP COBOL II/iX is not part of the HP 3000 Series 900 Computer System Fundamental Operating Software and must be purchased separately. This command is recognized only if HP COBOL II/iX is installed on your system. (Native Mode)

Syntax

COB85XLG[textfile] 
[ ,[ listfile] [ ,[ masterfile] [ ,newfile] ] ] ]
[ ;INFO=quotedstring] [ ;WKSP=workspacename] 
[ ;XDB=xdbfilename]
NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.

Parameters

textfile

The name of the file that contains the source file that is to be compiled. This can be any ASCII or toolset access method (TSAM) file. 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.

listfile

The name of the file to which the compiler writes the program 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 which is merged against textfile to produce a composite source. This can be any ASCII input file. Formal file 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 quoted string of no more than 255 characters, including the single or double quotation marks that enclose it, that specifies compile time options.

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. To extend the quotedstring string over more than one physical line make an ampersand (&) the last character of one line and continue the quotedstring string onto the next physical line. Each $ command is limited in length to the same size as in the source file:

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

This parameter is the actual file designator of an HPToolset workspace. The formal file designator created by the compiler is COBWKSP.

xdbfilename

Actual file designator for the file to be used by the symbolic debugger (XDB). This is 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, then 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 either 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.

Operation Notes

The COB74XLG command compiles, links, and executes a program using the ANSI 1974 standard entry point. If you do not specify textfile, HP COBOL II/iX expects the source program to be entered from your standard input device. If you do not specify listfile, HP COBOL II/iX sends the output to your standard list device.

The object file created during compilation is a system-defined temporary file, $NEWPASS, which is passed directly to the Link Editor as $OLDPASS. The Link Editor purges the object file and writes the linked program to $OLDPASS, which is then executed and may be executed repeatedly.

You cannot backreference the formal file designators used in this command (COBTEXT, COBOBJ, COBLIST, COBMAST, COBNEW, COBWKSP, and COBXDB) as actual file designators in the command parameter list. For further information, refer to the "Implicit FILE Commands for Subsystems" discussion of the FILE command.

NOTE: This command is implemented as a command file. If you set the HPPATH variable to null (SETVAR HPPATH ""), the command file is not executed, and the command fails.

Use

This command may be issued from a session, job, or program but not in BREAK. Pressing Break suspends the execution of this command. Entering the RESUME command continues the execution.

Examples

To compile, link, and execute an HP COBOL II/iX program entered from your standard input device and send the program listing to your standard list device, enter:

 COB74XLG

To compile, link, and execute an HP COBOL II/iX program from the disk file TEXTFL and send the program listing to the disk file LISTFL, enter:

 COB74XLG TEXTFL,LISTFL

Related Information

Commands

COB74XL, COB74XLK, LINK, RUN, XEQ, LINKEDIT Utility

Manuals

HP COBOL II/XL Reference Manual

HP COBOL II/XL Programmer's Guide

HP Link Editor/iX Reference Manual

COB74XLK

Compiles and links an HP COBOL II/iX program using the 1974 ANSI standard entry point. HP COBOL II/iX is not part of the HP 3000 Series 900 Computer System Fundamental Operating Software and must be purchased separately. This command is recognized only if HP COBOL II/iX is installed on your system. (Native Mode)

Syntax

COB74XLk[textfile] 
[ ,[ progfile] [ ,[ listfile] [ ,[ masterfile] [ ,newfile] ] ] ]
[ ;INFO=quotedstring] [ ;WKSP=workspacename] 
[ ;XDB=xdbfilename]
NOTE: This command follows the optional MPE/iX command line syntax. Refer to "Optional Format for MPE/iX Commands" at the beginning of this chapter.

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. 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.

progfile

The name of the object file to which the Link Editor writes the linked program. If you do not specify progfile, the default is $NEWPASS.

listfile

The name of the file to which the compiler writes the program 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 file which is merged against textfile to produce a composite source. This can be any ASCII input file. Formal file 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 file created by merging textfile and masterfile. This can be any ASCII output file. Formal file designator is COBNEW. Default is that no file is written.

quotedstring

A string of no more than 255 characters, including the single or double quotation marks that enclose it, that specifies compile time options.

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. To extend the quotedstring string over more than one physical line, make an ampersand (&) the last character of one line and continue the quotedstring string onto the next physical line.

Each $ command is limited in length to the same size as in the source file:

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

This parameter is the actual file designator of an HPToolset workspace. The formal file designator created by the compiler is COBWKSP.

xdbfilename

Actual file designator for the file to be used by XDB. This is 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, then 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 either 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.

Operation Notes

The COB74XLK command compiles and links an HP COBOL II/iX program into a disk file. If you do not specify textfile, HP COBOL II/iX expects your input from your standard input device. If you do not specify listfile, HP COBOL II/iX sends the listing output to your current list device.

The object file created during compilation is a system-defined temporary file, $NEWPASS, which is passed directly to the Link Editor as $OLDPASS. The Link Editor overwrites progfile which can then be executed.

You cannot backreference the formal file designators used in this command (COBTEXT, COBLIST, COBMAST, COBNEW, <