• Keine Ergebnisse gefunden

COMMAND FORMAT

Im Dokument C Volume 3 (Seite 140-143)

A l l c o m m a n d s c o n s i s t o f f r o m o n e t o f o u r fi e l d s . T h e fi r s t fi e l d i s o p t i o n a l . I t i s a $ o r / prefix character which precedes the program name. If a $ is present, it indicates that the specified program to be executed must be loaded from the system library. Therefore, even if a local file of the same name is present or a program or procedure of the same name resides on one of your global library files, the system program, not the local program or global library program, is executed. In all interactive subsystems except the batch subsystem, the system places a $ in the first field of all commands. Even in the batch subsystem, the system places a $ in front of the file editing commands ALTER, DELETE, DUP, LIST, MOVE, READ, WRITE, and WRITEN.

I f y o u u s e a s l a n t i n t h e fi r s t fi e l d o f l o c a l fi l e o r g l o b a l l i b r a r y fi l e c o m m a n d s , t h e system processes the parameters in operating system format. For global library file commands, the presence of an NPC= entry point in the specified library also forces the system to process the parameters in operating system format (refer to Volume 4, Program Interface). Otherwise, the system processes local file and global library file commands in product set format.

The slant option is ignored for command calls to programs residing on the system library.

For those types of calls, parameters are processed in the operating system format unless the SC directive of SYSEDIT has been entered. Refer to the SYSEDIT command in the NOS 2 System Maintenance Reference Manual for a description of the SC directive.

Example:

I f fi l e E X T R A C T i s a l o c a l fi l e a n d y o u e n t e r " ^ /EXTRACT,A,B,10.

the system treats the file as a local file command. The parameters are processed in operating system format because of the leading slant.

The second field contains the name of the program to be executed. The command name can be any valid file name.

The third field (optional) contains parameters which further define the operation to be performed. The parameter field is set off from the name field by a separator character. A valid terminator character must follow the third field (or the second field if no parameters a r e p r e s e n t ) . I n i n t e r a c t i v e j o b s , t h e t e r m i n a t o r I s o p t i o n a l .

The fourth field consists of a comments field. The comments field follows the terminator.

In general, the system ignores this field. However, some commands (MODIFY, FSE, GTR, LIBEDIT, and the like) read this comments field for directives.

In general, commands may not be continued beyond a single line. Exceptions are the

execution control commands (described in section 6) and tape management commands (described in section 12).

Global library file commands containing an ARG= entry point (ARG= is described in Volume 4, Program Interface) are not required to follow either the operating system or product set

format. The only syntax requirements enforced by the system for these commands is that the command name must be a valid file name followed by a separator. The command itself may have additional syntax requirements.

The following is a comparison of the operating system and product set formats (refer to the NOS 2 Applications Programmer's Instant for commands using the product set format).

5 - 2 6 0 4 5 9 6 8 0 E

0&S

parameter field. The one exception t o t h i s r u l e i s t h e u s e o f l i t e r a l s meanings; the system merely checks t h e s y n t a x o f t h e l i t e r a l . T h e called program must do its own p r o c e s s i n g o f t h e l i t e r a l .

4. All embedded blanks within a command except those appearing in literals are ignored.

6. Parameters, separators, and termi n a t o r s a r e s t o r e d i n t h e j o b ' s fi e l d play code equivalent beginning at RA+2. Separators and terminators are s t o r e d a s f o l l o w s :

Operating System Format Product Set Format

Character Code (Octal)

» 10

) or .

17

O t h e r v a l i d

16

separators

7. File names are one to seven alpha numeric characters.

8. Not NOS/BE compatible.

Refer to section 10 of Volume 4, Program Interface, for more i n f o r m a t i o n .

7. File names are one to seven alpha numeric characters. In some products, file names beginning with a numeric c h a r a c t e r a r e i n v a l i d .

8. NOS/BE compatible.

In general, no parameter can contain more than seven characters. The exceptions include procedure calls, flow control commands, some tape management commands and system or global library file commands with an ARG= entry point.

Depending on the program, the parameters can appear in either dependent or order-independent format. Order-dependent parameters are required when the parameters must be passed in a specific order. An example of order-dependent parameters is:

RESEQ,MYFILE,B,,20.

In this example, the system expects the resequencing increment to be passed as the fourth parameter; therefore, a separator must be present for the parameter not specified.

Order-independent parameters may be passed in any order. This is made possible by the use of keywords. A keyword is an identifier which has meaning either by itself or when used in conjunction with an option. Usually, keywords are passed with an option and a separator.

The separator must not be a comma. When the list of parameters is passed to the called program, all separators except commas are also passed.

Some programs require specific separators (usually = ), and others merely require that a separator be present. Examples of keyword notation are:

1. C0B0L5,I=SFILE,B=BFILE.

2. C0B0L5,B=BFILE,I=SFILE.

3. C0B0L5,L=0,E,EL.

4. JOBX,T10,CM45000.

In examples 1 and 2, both parameters and separators are passed to the COBOL 5 compiler.

Since these parameters are order independent, both commands produce the same result.

In example 3, two keywords are passed with no separator character. In example 4, the keyword is the first character of the first parameter and the first two characters of the second parameter.

5-4

60459680 E

The parameters and an image of the command being processed are written in the job

communication area (refer to section 10 of volume 4). The job communication area is the first lOOg words of your job's field length, from RA through RA+778. Section 1 and appendix E in Volume 4, Program Interface, describe this area.

The following commands produce the same image in the job communication area. Both commands are processed using operating system format.

PERMIT,FILEABC,USERAAA=R,USERBBB=W.

$PERMIT,FILEABC,USERAAA=R,USERBBB=W.

Im Dokument C Volume 3 (Seite 140-143)