ONXENTER Process Files/Lib. Elements with a DO procedure

ONXENTER ['str1'=...] {file lib(element) | %name|%?} [,do-params | ,?] [/ [enter-param] [,JRF= jr-file] [, JN=jobname] [, EM] ]

All marked files / library elements / Job variables will be processed by a specified DO procedure. This will be achieved by passing the flagged file or element to the DO procedure as the first positional parameter. The DO procedure is started as an Enter job with the help of the Job Report system. The termination of the job is monitored, and the user is notified on screen in the form of the Job Report mask. For further information, see the Job Report System in Chapter 11.

'str1'='str2' Name transformation rules. For further information, see page 5-.

If 'str1'='str2' is not specified, the name of the data object to be processed will be passed to the procedure in the following form:

a) Files/Job variables full file or JV name

b) FMS library elements full element name

c) LMS library elements the first eight characters of the element name (LMS-ISAM)

d) PLAM library elements element name without type and version description

If 'str1'='str2' is specified, the name passed to the procedure as parameter will be constructed as described in a) to d) above, with 'str1' being replaced by 'str2'. If the original name does not contain 'str1', then the name will be passed unchanged.

Examples:

...'CFS.S.'=''... The prefix 'CFS.S.' will be removed from the names

...''='CFS.S.'... The names will be prefixed with 'CFS.S.'

...'.SRC '=''... The suffix '.SRC' will be removed from the names

...' '='.SRC'... The names will be suffixed with '.SRC'

If 'str1'=... is not specified and if do-params contains one of the dummy variables !NAME, !ELEMENT, !LIBRARY, !TYP or !VERS, then the CFS procedure will not be given a name as the first positional parameter. The dummy variables in the do-params mostly will be substituted with the following:

!NAME Name of the file / Job variable

!ELEMENT Description of the library element without type and version

!LIBRARY Name of the library in which the element is contained

!TYP Type of the library element

!VERS Version of the library element

file Name of the DO procedure to be started as an Enter job in conjunction with the marked files or library elements.

lib(element) The DO procedure is stored as this library element. The element must be stored as a J type element if it is in a PLAM library.

%name Name of a parameter set in a JRSAVE file. The parameter mask saved with an SP %name command will be displayed. %name re-establishes a relationship not only to a particular DO procedure, but also to a particular set of parameters.

%? All relevant parameter sets will be displayed in a mask. One of these can be selected by marking it.

do-params, enter-params, jr-file, jobname

additional parameters for starting the DO procedure as an Enter job. DO parameters may not be specified in conjunction with %name. For a full description of the individual parameters , see Chapter 11 "Job Report System".

EM Enter Multiple. Each DO call will have its own Enter job, which will be monitored separately by Job Report.

Standard: Only one Enter job is started. Within this job, each marked file will be processed with /CALL do procedure,filename.

Notes:

The DO procedure specified with an ONXENTER Variable Action must contain at least one positional parameter. A 44 character file or element name will be passed to this first parameter. The DO procedure should be so constructed that a file or library element whose name is passed is processed in some way.

If elements of a library are to be processed with ONXENTER, the DO procedure should contain at least one other parameter for the library name. This should be specified in the DO procedure parameter mask when defining the Variable Action.

Starting a DO procedure as an Enter job, and specifying JRF=SYSLST will cause an /OPTION MSG=FH command to be inserted, as well as /SYSFILE SYSLST. This will ensure the SYSOUT log is also saved to the SYSLST file.

In conjunction with the ONXENTER Variable Action, see also the ONXDO Variable Action on page 5-.

Examples:

ONXENTER CFS.S.LMSLIB(ASSEMB),LIB=CFS.SRCLIB/JOB-CLASS=JCBLONG,TIME=500

The ASSEMB procedure in the library CFS.S.LMSLIB contains the following PROC statements:

/PROC N,(&PROGNAM, ":Name of the source program" -
/ &LIB=, ":Name of the source library" -
/ &IDA=NO, -
/ &XREF=NOXREF ":XREF/NOXREF/ATXREF/NOATXREF" -
/ ),SUBDTA=&



Given that the user had selected all source programs from the LMS library CFS.SRCLIB with a NPLMS CFS.SRCLIB command, the Variable Action described above will assemble all source programs marked with an X. The following Enter file will be created:



/LOGON
/SYSFILE SYSOUT=CFS.SYSOUT.tsn.time
/STEP
/DO CFS.S.LMSLIB(ASSEMB),(name-1,LIB=CFS.SRCLIB,IDA=NO,XREF=NOXREF,)
/STEP
/DO CFS.S.LMSLIB(ASSEMB),(name-2,LIB=CFS.SRCLIB,IDA=NO,XREF=NOXREF,)
/STEP
.....

/LOGOFF NOSPOOL



The Enter job will be started by CFS via the Job Report system. JOB-CLASS= JCBLONG and TIME=500 will be used as Enter parameters. After the Enter job has finished, the user will be presented with the job protocol in the form of the SYSOUT listing, CFS.SYSOUT.tsn.time.

ONXENTER CFS.S.LMSLIB(ASSEMB),LIB=CFS.SRCLIB/EM

The EM option (Enter Multiple) will result in an Enter job being created for each marked source element. For example:

/LOGON
/SYSFILE SYSOUT=CFS.SYSOUT.tsn.time
/STEP
/DO CFS.S.LMSLIB(ASSEMB),(name-1,LIB=CFS.SRCLIB,XREF=NOXREF,)
/STEP
/LOGOFF NOSPOOL

Each Enter file so created will be started by the Job Report system separately. The user will have each job's SYSOUT protocol displayed at the end of the job.