Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ARCHIVE macro

&pagelevel(2)&pagelevel

You can call ARCHIVE from user programs by means of the ARCHIVE macro. The statements in the macro are specified in the same way as in interactive mode (free string format). However, the HELP, PARAM and END statements are not permitted. In the macro, the parameters can be specified with their own operands.

ARCHIVE

address,length[,MF = L / (E,opadr) / (E,(1)) ]

,CNS = YES / NO

,RES = YES / NO

,UNL = NO / YES

,OP = {NO / YES

,WRCHK = NO / YES

,SNR = YES / NO

,DEST = NO / YES

,CATID = NO / YES

,STREAM = YES / NO

,OLS = NO / YES


address

Symbolic address of the ARCHIVE statement.

length
Length of the ARCHIVE statement.

MF
An operand list is generated.
For a description see the manual “Executive Macros” [5].

The operands of the ARCHIVE macro are similar to those of the PARAM statement; there are only a few operands which do not have the same names as in the PARAM statement, namely: RES stands for RESTART, UNL for UNLOAD, OP for OPERATOR and DEST for DESTROY.  

Return codes and error flags

Register 1 is overwritten.

The rightmost byte of register 15 contains the return code (RC), and the remaining bytes are deleted. 

RC

Meaning

X'00'

The statement was executed without errors.

X'10'

The statement was executed with warnings.

X'20'

The statement was executed with errors.

X'40'

Execution of the statement was not completed after an error.

X'80'

The statement was rejected due to an error.

X'81'

The address list was entered incorrectly or the statement is invalid; execution was not started.

X'FF'

ARCHIVE is not loaded.

Job switches are not set when ARCHIVE is called via the ARCHIVE macro. 

Example


(1)

In the ARCHIVE macro, the operands COMMAND and L'COMMAND specify the address and length respectively of the ARCHIVE statement in this Assembler program.

(2)

One FILES statement and one SAVE statement are defined at the address COMMAND.The NAME operand in the FILES statement specifies the files with the partially qualified filename FILE..
The SAVE statement specifies that ARCHIVE is to work with the directory file ARCHIVE.DIR.The save volume is taken from the volume pool, the volume type is specified.

(3)

The program that was, for example, stored in a library as the element ARCHIVE, can now be activated with

/START-EXECUTABLE-PROGRAM 
  FROM-FILE=*LIBRARY-ELEMENT(LIBRARY=$TEST.MACEXMP.LIB,
                             ELEMENT-OR-SYMBOL=ARCHIVE) 

or, in abbreviated form:

/SRX LIB=$TEST.MACEXMP.LIB,ELEM=ARCHIVE