Version 4.2.6 for Mainframes
 —  Operations  —

Natural in Batch Mode under BS2000/OSD

This document contains special considerations that refer to Natural in batch mode under the operating system BS2000/OSD.

The following topics are covered:

See also Natural under BS2000/OSD Batch Mode Error Messages.

For considerations that refer to Natural in batch mode generally, see:


Natural Datasets Used under a BS2000/OSD Batch Mode Session

The following optional sequential datasets are used during a Natural under BS2000/OSD batch mode session:

Dataset Explanation
CMPRMIN Dynamic Parameter Dataset
CMSYNIN Primary Input
CMOBJIN Input for Natural INPUT Statements
CMPRINT Primary Report Output
CMPLOG Optional Report Output for Dynamic Parameters
CMTRACE Optional Report Output for Natural Tracing
CMHCOPY Optional Report Output for Hardcopy
CMPRT Additional Reports
CMWKF Natural Work Files

CMPRMIN - Dynamic Parameter Dataset

CMPRMIN can be used as dynamic parameter dataset to overcome the length restriction for the character string in the job control PARM keyword of the EXEC statement.

All input records from CMPRMIN are concatenated into one parameter string. Only the first 72 positions of each CMPRMIN record are significant. Trailing blanks at the end of each record are truncated; no commas are inserted.

Additional dynamic parameters from the job-control PARM keyword can be supplied. They are concatenated after the parameters from CMPRMIN, which means that the PARM character string can be used to overwrite dynamic parameters specified in the CMPRMIN dataset.

For further information on reading dynamic parameters, see the keyword parameter DYNPAR=FILE for macro NAMBS2 (see DYNPAR).

CMSYNIN - Primary Input

CMSYNIN is used for the primary input file that contains Natural commands, Natural source programs, and (optionally) data to be read by INPUT statements during the execution of Natural programs.

The number of characters actually processed per line is determined by the current setting of the profile/session parameter SL. This setting applies for both source statement and execution time input data. This enables identification or sequence numbers to be placed in the rightmost columns of every record if desired.

/SYSFILE SYSDTA=file.

CMOBJIN - Input for Natural INPUT Statements

CMOBJIN is used for data intended to be read by Natural INPUT statements. This type of data can alternatively be placed in the CMSYNIN dataset immediately following the relevant source program or the relevant RUN or EXEC command.

When the setting for the profile parameter OBJIN is "N", Natural reads input from CMSYNIN. When OBJIN is set to "Y", Natural reads input from CMOBJIN.

When OBJIN is set to "R", Natural determines which option has been selected for a particular session depending upon the presence or absence of a CMOBJIN DD statement.

DCB considerations for CMOBJIN are the same as for CMSYNIN. The record read is interpreted up to the number of characters as specified with the profile/session parameter SL. If an error occurs, Natural reacts according to the setting of the profile/session parameter CC.

/SYSFILE SYSDTA=file

/SYSFILE SYSIPT=file must be set to enable reading of dynamic session parameters. A maximum of 3 lines per file is read as dynamic session parameters.

CMPRINT - Primary Report Output

CMPRINT is used for the primary output report resulting from DISPLAY, PRINT and WRITE statements in a Natural program.

/SYSFILE SYSOUT=file

or

/SYSFILE SYSLST=file 

depending on the value of the GLOBAL SET parameter &WRITE.

CMPLOG - Optional Report Output for Dynamic Parameters

If profile parameter PLOG is set to "ON", all dynamic profile parameters are written to this dataset during session initialization. If CMPLOG is not defined, CMPRINT is used instead.

/SYSFILE SYSOUT=file

or

/SYSFILE SYSLST=file 

depending on the value of the GLOBAL SET parameter &WRITE.

CMTRACE - Optional Report Output for Natural Tracing

If profile parameter ETRACE is set to ON, all trace output is written to this dataset during the session.

/SYSFILE SYSOUT=file

or

/SYSFILE SYSLST=file 

depending on the value of the GLOBAL SET parameter &WRITE.

CMHCOPY - Optional Report Output for Hardcopy

Hardcopy output destination. This dataset's name can be changed with profile parameter HCDEST or with terminal command %H.

/SYSFILE SYSOUT=file

or

/SYSFILE SYSLST=file 

depending on the value of the GLOBAL SET parameter &WRITE.

CMPRTnn - Additional Reports

CMPRTnn is used for each additional report referenced by any Natural program compiled or executed during the session. nn must be a two-digit decimal number in the range 01-31 corresponding to the report number used in a DISPLAY, PRINT and WRITE statement.

Instead of CMPRTnn, another file name may be used by setting the DEST subparameter of profile parameter PRINT to an appropriate value, for example:

PRINT=((nn),...,DEST=PRINTFIL)

DCB information is optional. If omitted, it is supplied with profile parameter PRINT, subparameters RECFM, LRECL and BLKSIZE. If RECFM is not supplied, it is set to value "VBA". If no DCB information is supplied, the following applies:

/FILE file, LINK=Pnn.

CMWKFnn - Natural Work Files

CMWKFnn is used for each Natural work file referenced by any Natural program compiled or executed during the session. nn must be a two-digit decimal number in the range 01 - 32 corresponding to the number used in a READ WORK FILE or WRITE WORK FILE statement.

Instead of CMWKFnn, another file name may be used by setting the subparameter DEST of profile parameter WORK to an appropriate value.

DCB information is optional for output files. If omitted, it is supplied in the profile parameter WORK, subparameters RECFM, LRECL and BLKSIZE. If no DCB information is supplied, the following applies:

/FILE file,LINK=Wnn

Top of page

Keyword Parameters

The Natural BS2000/OSD batch mode driver is generated by assembling the macro NAMBS2. For the control of conditional assembly of the driver modules, the following keyword parameters are available.

The parameters are sorted in alphabetical order by their names.

ADACOM

Possible values: ADACOM=ADAUSER, ADACOM=ADABAS, ADACOM=ADALNK
Default value: ADACOM=ADALNK

This parameter applies to the generation of the front-end part. It determines which Adabas link module is to be used. Possible values:

ADACOM=ADAUSER The module ADAUSER is linked to the front-end part (Adabas versions lower than 7.1).
ADACOM=ADABAS The modules ADAUSER and SSFB2C are linked to the front-end part (Adabas Version 7.1 and higher).
ADACOM=ADALNK The module ADALNK is linked to the front-end part (Adabas versions lower than 7.1) or the modules ADALNK, ADAL2P and SSFB2C are linked to the front-end part (Adabas Version 7.1 and higher).

ADDBUFF

Possible values: 1 to 8
Default value: None

This parameter applies to the generation of the front-end part.

It determines the additional number of pages (4 KB units) for the terminal I/O buffer.

APPLNAM

Possible values: name
Default value: NATBS2

This parameter applies to the generation of the front-end part.

name is the name (maximum 8 characters) of the Natural batch application. This name is part of the serialization ID when the Natural batch task is initialized.

CODE

Possible values: FRONT/RENT
Default value: FRONT

This parameter applies to the generation of both the front-end and reentrant parts.

It determines which part of the Natural BS2000/OSD interface is to be generated.

CODE=FRONT indicates the generation/assembly of the front-end part.
CODE=RENT indicates the generation/assembly of the reentrant part.

DELETE

Possible values: ON/OFF
Default value: ON

This parameter applies to the generation of the reentrant part.

DELETE=ON The setting of the profile parameter DELETE in the Natural parameter module determines whether dynamically loaded non-Natural programs are unloaded at the end of the Natural program in which they are loaded or whether they are unloaded when command mode is entered.
DELETE=OFF A dynamically loaded non-Natural program once loaded is kept for the duration of the whole Natural session.

DYNPAR

Possible values: SYSDTA/SYSIPT/FILE/NO
Default value: NO

This parameter applies to the generation of the front-end part.

DYNPAR=NO No dynamic parameters are read.
DYNPAR=SYSDTA The dynamic parameters are read from SYSDTA. If SYSDTA is assigned to SYSCMD, at least an /EOF card must follow the /EXEC Natural card.
Example:
/LOGON
/SYSFILE SYSDTA=(SYSCMD)
/EXEC NATBAT
/EOF * Null dynamic parameters
LOGON SYSEXTP
L * *
FIN
/LOGOFF

DYNPAR=SYSIPT The dynamic parameters are read from SYSIPT.
DYNPAR=FILE The dynamic parameters are read from a sequential file. The input of this SAM file is interpreted as one single text string, which means that the individual entries must be separated from each other by a comma, even at the end of a line. Such a parameter file must be defined with a FILE command by using the LINK parameter CMPRMIN.
Example:
/FILE NAT.PARAMS,LINK=CMPRMIN

ILCS

Possible values: YES/NO/CRTE
Default value: NO

This parameter applies to the generation of the reentrant part.

ILCS=CRTE

3GL subprograms are invoked with common runtime environment convention. For this to be possible, the ILCS initialization routine IT0SL# must be linked to the Natural front-end:

INCLUDE IT0SL#,SYSLNK.CRTE.010
RESOLVE,SYSLNK.CRTE.010
ILCS=YES

3GL subprograms are invoked with enhanced ILCS linkage convention. For this to be possible, the ILCS initialization routine IT0INITS must be linked to the Natural front-end:

INCLUDE IT0INITS,SYSLNK.ILCS
RESOLVE,SYSLNK.ILCS
ILCS=NO Standard processing applies.

JV

Possible values: ON/OFF
Default value: OFF

This parameter applies to the generation of the front-end part.

JV=ON The condition code created when the Natural session is terminated is passed to a job variable if one has been declared with the link name *NATB2JV.
JV=OFF If your BS2000/OSD installation does not include the Siemens product "Job Variables," this parameter must be set to OFF; otherwise assembly errors in the NAMBS2 compilation occur.

LF

Possible values: X'zz'
Default value: X'25'

This parameter applies to the generation of the front-end part.

With this parameter, you specify the control character to be used for line advance when printing on the local printer.

LINK

Possible values:

name
(name,name,...)

Default value: none

This parameter applies to the generation of the front-end part.

The name(s) of programs and modules that are called from Natural programs and linked with the non-reentrant part must be specified with this parameter. Conversely, the programs and modules whose names are specified must be linked with the non-reentrant part, otherwise the application is put into status SYSTEMERROR and all users are rejected with an error message.

A "TABLE" macro call is performed for the specified programs and modules, which enters their load addresses into the dynamic loader's link table. It is therefore not necessary to dynamically load these programs when they are called by Natural programs. For dynamically loaded programs, only the load library needs to be defined in the Natural parameter module.

Example:

LINK=PROG1
LINK=(PROG1,PROG2,MODUL111)

LINK2/LINK3/LINK4

Possible values:

name
(name,name,...)

Default value: none

These parameters apply to the generation of the front-end part.

The parameters LINK2, LINK3 and LINK4 are an extension of the LINK parameter. Since an operand definition cannot be longer than 127 characters (including parentheses), these parameters are provided for cases where the operand of parameter LINK would be too long. The syntax is analogous to that of LINK.

Examples:

NAMBS2 LINK=(PROG1,PROG2,...),
LINK2=(PROG54,...)
NAMBS2 LINK=(PROG1,PROG2,PROG3,PROG4)

NUCNAME

Possible values: name
Default value: NB2RENT

This parameter applies to the generation of the front-end part.

With this parameter, you specify the name of the bounded, reentrant Natural module. You must use this name for the Natural pool and load information in macro ADDON (macro ADDON assembles BS2STUB).

PARMOD

Possible values: (nn,loc)

nn: 24/31
loc: BELOW/ABOVE

Default values: (31,ABOVE)

This parameter applies to the generation of both the front-end and reentrant parts.

The first part of this parameter (nn) is used to define an addressing mode (24-bit or 31-bit mode) for the Natural BS2000/OSD application.

31-bit mode is required if the Natural buffer pool, the reentrant part of the Natural BS2000/OSD application, Adabas or the Adabas Fast Path pool is located above 16 MB.

The second part of this parameter (loc) is used to define the front-end part location of the Natural BS2000/OSD application. If you load the front-end part of the application above 16 MB, this must be defined in the front-end part's link procedure as follows:

LOADPT=*XS 

or

LOADPT=X'address'

Example:

/EXEC TSOLINK
PROG NAT230,FILENAM=NAT230,LOADPT=*XS,...
TRAITS RMODE=ANY,AMODE=31
INCLUDE....
/* PARMOD=(nn,loc) MUST BE IDENTICAL IN THE FRONT-END AND REENTRANT PARTS

REQMLOC

Possible values: RES/BELOW/ABOVE
Default value: RES

This parameter applies to the generation of both the front-end and reentrant parts in 31-bit mode (PARMOD=31).

This parameter determines where the requested Natural work areas are to be allocated by the system using request memory.

REQMLOC=BELOW All areas are requested below 16 MB.
REQMLOC=ABOVE All areas are requested above 16 MB.
REQMLOC=RES All areas are requested depending on the location of the reentrant part.

The REQMLOC parameter corresponds to the LOC parameter of the BS2000/OSD system macro REQM.

SYSDTA

Possible values: PRIMARY/SYSCMD
Default value: PRIMARY

This parameter applies for the generation of the front-end part.

SYSDTA=PRIMARY After reading of dynamic parameters from SYSDTA, SYSDTA is set to SYSFILE SYSDTA=(PRIMARY).
SYSDTA=SYSCMD After reading of dynamic parameters from SYSDTA, SYSDTA is set to SYSFILE SYSDTA=(SYSCMD).

TERM

Possible values: PRGR/STEP
Default value: PRGR

This parameter applies to the generation of the front-end part.

TERM=PRGR The Natural batch application will be terminated.
TERM=STEP The system additionally executes the next SET-JOB-STEP command.

TRACE

Possible values: nn, ll

nn: 01 to 99
ll: 71 to 132

Default value: 99,71

This parameter applies to the generation of the reentrant part.

With this parameter, you specify the number of a trace file and the maximum length of a trace print record. nn is the number for the SYSLSTnn trace file and ll is the maximal length in characters of a trace print record.

If any external Natural trace function is active, the trace records will be written to SYSLSTnn. In this case, the Natural batch mode driver creates the following trace file:

Example:

NATURAL.TRACE.BTCH.TTTT,SPACE=(30,3)
SYSFILE SYSLSTnn=Natural.TRACE.BTCH.TTTT
/* TTTT is the task sequence number

Before the Natural batch mode session is terminated, the trace file will be closed as follows:

SYSFILE SYSLSTnn=(PRIMARY)

USERID

Possible values: YES/SYSTEM/NO/USER
Default value: USER

This parameter applies to the generation of the front-end part.

USERID=SYSTEM or USERID=YES The Natural user ID is created by using the BS2000/OSD user ID.
USERID=USER or USERID=NO The Natural user ID is created by using the job name; that is, the /.JOBNAME of the LOGON command. If no BS2000/OSD job name has been specified with the LOGON command, the Natural user ID is created as with USERID=SYSTEM or YES.

WRITE

Possible values: SYSOUT/SYSLST
Default value: SYSLST

This parameter applies to the generation of both the front-end and reentrant parts.

This parameter controls whether output produced by Natural is written to SYSOUT or SYSLST.

Top of page

BS2000/OSD Job Variables

The Natural batch mode driver uses the BS2000/OSD facility "Job Variables" to pass return codes to the user or to subsequent jobs (steps). The return codes are created either by Natural itself (in the range 1 to 31) or by the Natural application if a TERMINATE statement is used with the condition-code option (the range to be used is 32 to 256).

The job variable which is to contain the return code has to be declared using the link name *NATB2JV. The support of job variables depends on the setting of the SET parameter &JV in the Natural BS2000/OSD batch mode driver NATBS2.

Example:

/LOGON
/DCLJV NATBJV,LINK=*NATB2JV
/EXEC NATnnnB
*TERMCC
/LOGOFF

To assign Return Code 36 to NATBJV, the Natural program TERMCC could be coded as follows:

ASSIGN CC(N8) = 36
TERMINATE CC
END

Top of page