5.  Variable Actions

Variable Actions are operations on files/ Job variables/ library elements that require one or more parameters for their execution, other than the name of the data object. A simple example is the operation of transfering a file from one disc drive to another. In addition to the name, the Volume Serial Number (VSN) and device type need to be specified.

Variable Actions are particulary useful if a complex set of operations needs to be carried out on a number of data objects (files/library elements/Job variables). For CFS batch applications, the Variable Actions defined in the ON& ... form are suitable.

The counterpart to a Variable Action is the Action Code, which is a 1 to 5 character code entered next to the name of a particular data object. This code, e.g. P (= Print), PSE (= Print ,Space=E,Erase), E (= Erase), ED (= Erase, Destroy), etc. will process the operation for that file only.

No further parameterisation is necessary for these Action Codes, apart from the name of the data object. All available parameters can be entered as part of the Action Code.

For simple operations on a small number of data objects, these direct Action Codes are easier to handle, as well as having the advantage that most of them are processed immediately. They do not have to be collated and processed later on, as do Variable Actions. In addition, the step of defining the Variable Action is eliminated.

All Variable Actions start with: ONX... or ON&...

ONX... The Variable Action is only carried out for the data objects (files/Job variables/ library elements) that have been explicitly marked by the user with the Action Code X or XE/Xt (see page 6-).

ON&... The Variable Action is automatically carried out for all entries in the file list, without an X Action Code needing to be entered.

Only the generic form ONX.... will be described in this Chapter.

Some of the following Variable Actions may be entered in the CFS command field as an individual command, or as an Action Code.

The Variable Actions can be entered as such in the command field as well as in the initial selection mask.

Variable Actions and Parameter Sets

All Variable Actions are defined in the form ONX varact [params] or ON& varact [params] . varact is the name of the Variable Action. params are optional parameters associated with that Variable Action.

Examples:

ONX/MOD-FILE-ATTR PROTECT=*PAR(ACCESS=*READ)

ON&FT HOST21,TSOS,ADMINSTR,C'....',DO.SUCCESS,*,DO.FAIL,*

Instead of ONX varact [params], the Variable Action can also be specified as ONX %name [,jrsave] . %name is the name of a parameter set under which the Variable Action had previously been saved. For further information, see the SP VAR%name [,jrsave] command in the CFS file list. jrsave is the name of a specific file if it is to differ from the standard JRSAVE file.

ONX %name [,jrsave] ,? will display the Variable Action stored in the named Parameter Set.

ONX %? will display the Variable Actions stored in all Parameter Sets.

Specifying a Variable Action by means of a parameter set is particularly useful when executing complicated SDF commands which have had to be created using the SDF dialog facility.

Example:

ON&/MOD-FILE-ATTR?

Prompted SDF dialog. The parameter structure of the command can then be filled in.

SP VAR%MFA,CFS.JRSAVE.TEST

This CFS command will cause the SDF command completed using the prompted SDF dialog facility to be saved in a parameter set called %MFA, to the file CFS.JRSAVE.TEST.

The full SDF command can then be re-activated during a later CFS session by means of the following Variable Action: ONX%MFA,CFS.JRSAVE.TEST

Entering ONX%MFA,CFS.JRSAVE.TEST,? will cause an SDF screen to be displayed containing the command and the parameters saved in the parameter set. These can then be overwritten if required.

Name Transformation Rules 'str1'='str2' | 'str1'=DS[n][I] | 'str1'=DP[n][I]

All Variable Actions corresponding to the form ONX...'str1'='str2', which creates a data object name-2 from name-1, adhere to one of the following rules:

'str1'='str2' The first occurrence of character string 'str1' in name-1 will be replaced by 'str2'. The result will be name-2.

'str1'=DP[n][I] Delete Prefix: In name-1 the first occurence of the string 'str1' will be sought. All (=DP), or the next n characters left of 'str1' (=DPn) will be deleted. Including the option I will cause the search string 'str1' to be deleted. The result will be stored in name-2.

'str1'=DS[n][I] Delete Suffix: In name-1 the first occurence of the string 'str1' will be sought. All (=DS), or the next n characters right of 'str1' (=DSn) will be deleted. Including the option I will cause the search string 'str1' to be deleted. The result will be stored in name-2.

If 'str1' is not contained in name-1, the Variable Action will not be executed for that data object.

By default, every name is suffixed with '_'. Thus, '_'='.xxx' will append a suffix to a data object. Or, for example, '_'=DP5 will delete the last five characters from the end of the name.

By default, a null string, '' , prefixes every name. ''='xxx.' will thus put a prefix of 'xxx.' on the name.

Suppress File Names Display

Displaying the Variable Actions on the screen as they are executed can extend the execution time significantly. This delay is particularly noticeable when processing large numbers of files.

Setting Task switch 14 (/SETSW ON=14) before executing the Variable Action will prevent the log being displayed.

All files/library elements/Job variables on which a Variable Action has been successfully executed is removed from the file list ('-' Action Code). After the Variable Action has been processed for all files, and after answering U to the following termination query, the user will be presented with a new file list containing only those files for which the Variable Action was unsuccessful. The YANK command (see page 7-) can be used to make the removed entries visible again.

Mass processing of files can equally well be performed in DO or Enter procedures. An example of such a DO procedure is as follows:

/PROC C
/SYSFILE SYSDTA=(SYSCMD)
/SETSW ON=(1,4,11,14)
/EXEC CFS
*001 FILE=...;USER-ID=...;DOC=CFS.DOC;VAR=ON&MOVE :X:
/SETSW OFF=(1,4,11,14)
/ENDP

The above procedure will move the selected files (FILE=...;USER-ID=...) to the :X: Public Volume Set. The names of all files for which the move operation was unsuccessful will be listed in the CFS.DOC file. Entering OLDLIST CFS.DOC in the FILENAME-SELECT field will allow the user to manipulate them further if required.

Define Variable Action in Dialog and process it as an Enter job

CFS allows Variable Actions (ONX../ON&..) to be defined in dialog mode, and to be processed as an Enter job under control of the Job Report System (see Chapter 11). The Variable Action should be entered in the usual way from the CFS mask in dialog. ONX... will process only the marked items, and ON&... will process all the entries.

The required Variable Actions will be processed in their own Enter job if the definition of the Variable Action is terminated with ,ENTER [,AP] [/enter-params]

The definition of the Variable Action containing the suffix ,PROC [=procfile] [, AP] will cause a BS2000 procedure to be generated. If the procfile parameter is not specified, a standard file name (CFS.P.tsn.hhmmss) will be generated for the procedure. The DOC file referenced in the DO procedure will not be deleted automatically, as is the case with ,ENTER.

The AP parameter will enable any required file passwords to be entered prior to the start of the Enter job. Terminating the password entry process is achieved by pressing the K1 key, or by entering END [,C'passw']. The C'passw' option will result in the Enter file created by CFS being cataloged with a read password.

Any valid Enter command parameter may be specified for enter-params, such as JOB-CLASS= JCBLONG,TIME=100,PRIORITY=180. For further information on the Enter parameters, see page 11-.

Processing Variable Actions with the ENTER parameter begins with a documentation file being created containing either the entire list, or only marked items. An Enter file is then prepared with the following contents:

/LOGON
/SYSFILE SYSDTA=(SYSCMD)
/SYSFILE SYSOUT=CFS.SYSOUT.tsn.hhmmss
/SETSW ON=(4,11)
/EXEC CFS
*001 FILE=OLDLIST CFS.DOC.tsn.hhmmss; -
VAR=ON&....
/ER CFS.DOC.tsn.hhmmss
/STEP
/LOGOFF NOSPOOL

This Enter file is then started and controlled by the Job Report System. When the job has finished, the user will be presented automatically with the SYSOUT listing on screen. A full description of the respective masks can be found on page 11-.

Examples:

ONXREORG,ENTER

The ISAM files or libraries marked with an X are reorganised by CFS in an Enter job. The job runs in the background, avoiding any waiting on the screen.

ON&FIND'/EXEC CFS','/EXEC $CFS'=W CFS.RESULT,ENTER/TIME=500

All files and libraries selected in the file list will be searched for the occurence of the specified character string. The resulting records are written to a file CFS.RESULT. The Variable Action will be run as its own Enter job which is started with a TIME=500 parameter.

ON&FIND' EXEC CFS','/EXEC $CFS'=W CFS.RESULT,PROC=CFS.P.FIND

All the selected files/libraries will be searched for the specified string. The resulting records containing the string will be written to the file CFS.RESULT. A DO procedure called CFS.P.FIND will be created to execute the Variable Action. This will not be started automatically by CFS - the user must start it manually.

Execute BS2000 Command for Files/Job Variables/Library Elements

ONX/cmd-name cmd-param

A BS2000 command is executed for each marked file/Job variable. Only the command name (e.g. FILE) and the command parameter (e.g. SPACE=-9999) needs to be given. The two parts of the Variable Action must be separated with a blank. Upon execution, CFS will substitute the file or JV name in the command.

For the Variable Action to substitute the file name, the eventual BS2000 command needs to be structured as follows:

/cmd-name file-name,cmd-param. Commands with a different structure, such as /SETJV (jv, start,len),value can also be processed with a Variable Action by specifying the string !NAME at the point at which the file name should be substituted.

Notes:

If an SDF command is intended when specifying cmd-name, then the SDF prompt screen can be displayed by entering ONX/cmd-name? and the individual parameters can then be entered. The string $$NAME will be passed as a dummy variable for the file name from the first positional parameter. $$NAME may not be deleted or modified. All parameters completed from the SDF prompt screens are saved and will then be substituted during the execution of the SDF command.

The SDF prompt screen can also be requested via the parameters for a particular keyword XYZ: ONX/cmd-name ...,XYZ=*PAR(?)

The parameters relating to a set of completed SDF prompt screens, and the SDF command name can be saved to a CFS parameter set %name, to be reused later. This is achieved by entering the command SP VAR%name [,jrsave] from the CFS file list. The Variable Action representing the SDF command and its associated parameters can be executed by entering: ONX%name [,jrsave] [,?].

Entering ? will cause the contents of the parameter set to be displayed.

For examples, see page 5-.

Examples:

ONX/CAT WRPASS=NONE,RDPASS=NONE,EXPASS=NONE

For Variable Actions ONX/CAT... / ONX/CATJV..., STATE=U will be appended if it was not explicitly entered as a CAT parameter.

ONX/MC FILE=(DEL=!NAME)

ONX/SETJV (!NAME,128,10),'28.02.1992'

ONX/ENTER TIME=1000,ERASE=YES

ONX/PRINT DEV=STATION1,ERASE

ONX/ERASE

The last three commands can also be used for library elements.

With libraries, ON&/ERASE will effect a DELETE on all selected library elements (of interest for CFS procedures).

ON&/PRINT ... will print the selected library elements.

Add Files/Elements to Library without a name change /

Transfer Elements to another Library

ONXADD library [,CA] [,CPR] [,CL[typ]]

Add the files marked with X to a library (FMS/LMS/PLAM).

Transfer the elements marked with an X to another library.

library Library name in which the elements should be stored.

The element names are created from the input file names or from the input element names.

When adding objects to ISAM LMS libraries, it should be noted that the element name will consist only of the first 8 characters of the last partial qualification of the input name.

CA Copy All Delta Versions. This parameter is only relevant when transfering elements between two PLAM libraries. For a full description, see page 5-.

CPR Copy Protection. This parameter is only relevant when transfering elements between two PLAM libraries. For a full description, see page 5-.

CL[typ] Create Library. If the library does not exist, it will be created automatically. The standard prompt "Create Library ?" will not be displayed. If the library does exist, this parameter has no effect.

If typ is specified, then the library will be created using this parameter. Possible values are : F/L/P/P2/N. Standard: P

Examples of how names are constructed when adding to different library types, if the name of the file to be added is: ABC.S.TESTFILE1

FMS --> ABC.S.TESTFILE1

LMS (ISAM) --> TESTFILE (8 characters of the last partial qualif.)

PLAM --> S/ABC.S.TESTFILE1 (S = Standard element type)

Notes:

The Variable Action ONXADD can also be used to copy elements from one library (FMS/LMS/PLAM) to another.

If the target library does not exist, the user is asked in which format it should be created:

"Create FMS-/LMS-/PLAM-Library/ZIP/None ? (F/L/P<1/2>/Z/N/?)"

F An FMS library is created.

L A library in the old LMS format (OSM: Source/Macro) is created.

P A PLAM library will be created ( BLKSIZE=(STD,2) ).

P1 A PLAM library optimised for FTP will be created ( BLKSIZE=(STD,1) ).

Z A new ZIP archive will be created.

N The user made a mistake when entering the library name. No library should be created under this name, and the ONXADD Variable Action or the ADD command should be aborted.

? This Help information will be displayed.

If elements from a FMS, LMS or PLAM library are to be transferred to a new library, CFS will use the same primary and secondary space allocation for this new library as occupied by the original.

Files of any format may be copied to FMS libraries, including PAM files (program phases) and files with RECFORM=F,BLKSIZE=(STD,x). These elements may not however then be processed by FMS.

Files may not contain any '#' characters if they are to be copied to LMS-ISAM libraries, since CFS interprets the following characters as a version description of the element.

When copying elements from a PLAM library to an FMS library, the element name will be prefixed with the element type as a partial qualification (e.g. 'S.'). If the elements should be copied without a type description, the Variable Action should be specified in the form ONXADD 't/'='' fms-lib.

Add: Add to Library and Rename

ONXADD [t/] ['str1'= ...] library [,CA] [,CPR]

The files/library elements will be added to the specified library. Copying from one PLAM library to another will result in the version description being copied as well. The version description will not be copied when copying an ISAM-LMS element. No version description will be created when adding files to PLAM libraries.

'str1'= ... Name Transformation Rules

'str1'='str2' | 'str1'=DP[n][I] | 'str1'=DS[n][I]

'str1'='str2'

The name of the new library element will be constructed by searching the original name for the string 'str1' and replacing it by 'str2'. By default, the empty string '_' appears at the end of every name, and the null string '' at the beginning. If the original name does not contain 'str1', the Variable Action will not be executed for this data object.

'str1'=DP[n][I]

Delete Prefix: The name of the new library element will be constructed by searching the original name for the string 'str1' and deleting all, or n characters to the left. Specifying the I option will cause 'str1' to be deleted as well.

'str1'=DS[n][I]

Delete Suffix: The name of the new library element will be constructed by searching the original name for the string 'str1' and deleting all, or n following characters. Specifying the I option will cause 'str1' to be deleted as well.

If 'str1'=... is omitted, the name of the new library element will be identical to the original name. For further information regarding name transformation rules, see page 5-. Examples of name transformation can be found below.

t Only when adding to PLAM libraries: The data objects marked with an X are added to the specified library as elements of the specified type. If no type is given, S/ will be used as standard. When copying elements from one PLAM library to another, if no element type is specified, the newly created element will be the same type as the original.

When marking the files to be defined for the Variable Action, the user may amend the element type by entering the Action Code Xt. t will specify a different type to that in the Variable Action. The type specified in an Action Code takes precedence over a type defined in a Variable Action. E is not a valid element type in an Action Code, since XE will be interpreted by CFS as a command to erase the source file or element after successfully adding it to the target library.

library Name of the library to which the element should be added.

CA Copy All Delta Versions. This parameter is only valid when copying elements stored in Delta format between two PLAM libraries. Delta format elements will be copied with the structure intact, i.e. all versions belonging to the element will be copied to the new library. If the CA option is not specified (standard), then only the version marked with an X will be copied to the target library.

CPR Copy Protection Attributes. This parameter is only valid when copying elements between two PLAM libraries under the same userid. Existing Read, Write and Execute passwords, as well as the Basic Access Control List (BACL) of the source element are created for the new element created in the target library. If the target library needs to be created, then the library and type attributes used will be taken from the source library. Library attributes are defined by the administration rights (see page 6-) and the standard protection attributes for new elements (see page 6-). Type attributes are defined by standard protection attributes for newly created elements of that particular type.

Notes:

The USER-DATE and USER-TIME fields in the library directory are available for PLAM library elements. The user may enter any date in this field. When adding files or library elements to a PLAM library, the user date from the original element will be transferred, together with the element.

When copying elements from one PLAM library to another, the contents of the USER-DATE and USER-TIME fields will also be transferred to the new library. See the Variable Action ONXSETUDAT on page 5- for more information.

When adding elements to a PLAM library, CFS can check the specified element type for LMS compatibility. Two possibilities exist:

- LMS-incompatible type descriptions are rejected

- the user is asked if the element with an LMS-incompatible type should really be added to the library.

The following commands are available to control the type checking:

CT Check Types. Only LMS-compatible types are allowed.

CTQ Check Types Query. The user will be asked if an LMS-incompatible type is encountered (Standard).

NCT No Check Types. No type checking.

LMS-compatible element types in PLAM libraries:

C Load modules

D Document/Data

H H-Assembler result data

J JCL (DO / Enter Procedures)

L Data created by BS2000 Binder

M Macro

P Printable data (with SPACE=E)

R Relocatable (Object modules)

S Source

X Extra

Examples for building names when adding different element types to a library. File name = ABC.S.TESTFILE1.

ONXADD'S.'='SRC.' lib

FMS ABC.S.TESTFILE1 -->   ABC.SRC.TESTFILE1

LMS (ISAM) ABC.S.TESTFILE1 -->   TESTFILE (8 characters of the last partial

 qualification)

PLAM ABC.S.TESTFILE1 -->   S/ABC.SRC.TESTFILE1

ONXADD'ABC.S.'='' lib

FMS ABC.S.TESTFILE1 -->   TESTFILE1

LMS (ISAM) ABC.S.TESTFILE1 -->   TESTFILE

PLAM ABC.S.TESTFILE1 -->   S/TESTFILE1

ONXADD''='XYZ' lib

FMS ABC.S.TESTFILE1 -->   XYZABC.S.TESTFILE1

LMS (ISAM) ABC.S.TESTFILE1 -->   TESTFILE

PLAM ABC.S.TESTFILE1 -->   S/XYZABC.S.TESTFILE1

ONXADD' '='.301192' lib

FMS ABC.S.TESTFILE1 -->   ABC.S.TESTFILE1.301192

LMS (ISAM) ABC.S.TESTFILE1 -->   301192

PLAM ABC.S.TESTFILE1 -->   S/ABC.S.TESTFILE1.301192

ONXADD lib or ONXADD''='' lib

FMS ABC.S.TESTFILE1 -->   ABC.S.TESTFILE1

LMS (ISAM) ABC.S.TESTFILE1 -->   TESTFILE1

PLAM ABC.S.TESTFILE1 -->   S/ABC.S.TESTFILE1

ONXADD X/lib

FMS ABC.S.TESTFILE1 -->   ABC.S.TESTFILE1

LMS (ISAM) ABC.S.TESTFILE1 -->   TESTFILE

PLAM ABC.S.TESTFILE1 -->   X/ABC.S.TESTFILE1

ONXADD X/'ABC.S.'='' lib

FMS ABC.S.TESTFILE1 -->   TESTFILE1

LMS (ISAM) ABC.S.TESTFILE1 -->   TESTFILE

PLAM ABC.S.TESTFILE1 -->   X/TESTFILE1

Changing the element type when copying between two PLAM libraries.

ONXADD M/lib

PLAM: S/TEST -->   M/TEST

ONXADD'S/'='M/'lib

PLAM S/TEST -->   M/TEST

ONXADD lib and mark the element to be copied with the Xt Action Code, where t is the type the element should have.

PLAM S/TEST -->   M/TEST

XM = Action-Code

Amending the version description when copying PLAM elements

ONXADD'/###'=''lib

The number of '#' characters are determined by the version description.

PLAM S/TEST/017 -->   S/TEST

ONXADD'/###'='/001'lib

PLAM S/TEST/017 -->   S/TEST/001

Prefixing an Element Name:

ONXADD'/'='/ABC.'lib

PLAM S/TEST       -->   S/ABC.TEST

Copying LMS-ISAM elements to a PLAM library with simultaneous version definition.

ONXADD M/' '='/001'lib

LMS-ISAM MAC1 /.../... -->   M/MAC1/001 (PLAM)

Delta Format PLAM Elements:

Delta storage of elements means that only the changes to the previous version are stored. The Delta storage technique results in a greatly reduced space requirement in comparison to the full storage of all versions of the elements. LMS Version 1.4 or above is necessary to process delta format elements properly.

If an element is copied from another library, or if a file is added with ONXADD to a PLAM library, then the following cases can be distinguished for Delta storage:

1) The CA (Copy All) parameter is specified with the ONXADD Variable Action. In this case, all versions of a delta format element will be copied to the target library, structurally intact. The following points 2) and 3) are relevant if the CA parameter is not specified (Standard).

2) An element already exists in the target library with the specified name and element type. In this case, the storage format of the existing element is retained, and the following possibilities exist:

a) The element is stored as a full element (i.e. not in delta format). The existing element is overwritten by the identically named new element, so long as no differing version numbers exist.

b) The element is stored in delta format. The new element or file is added as a new version on the existing delta tree with the version number being incremented. The old element is thus not overwritten, and may still be retrieved.

3) The target library does not contain any element with the specified name. In this case, the following possibilities exist:

a) The element to be transferred is stored in non-delta format. The element will thus also be created in the target library in non-delta format.

b) The element to be transferred is stored in delta format.

- The element is created in the target library in non-delta format if the DELTA User Option was not specified when selecting the original library.

- The element is created in the target library in delta format if the DELTA User Option was specified when selecting the source library. A full description of the DELTA User Option may be found on page 4-.

Save Files with ARCHIVE

ONXARCHIVE stmt [PARAM param ]

A DO procedure for an ARCHIVE run is created.

stmt ARCHIVE process statement e.g. E[XPORT], S[AVE].

param additional parameters for the ARCHIVE run. When these parameters are specified, the standard parameters normally used by CFS - PARAM CNS=NO, UNLOAD=YES,STREAM=YES - are not set, and must be specified explicitly.

After the procedure has been created, the user is asked whether this procedure should be run in dialog or enter mode, or not at all (only create the procedure).

If the DO procedure is run in dialog, CFS executes a DO command, and thus ends the program.

Running the DO procedure in Enter mode will be achieved via the Job Report System, i.e. the user is automatically notified with the SYSOUT listing on screen after the Enter job terminates.

Examples:

ONXARCHIVE E L=SYSOUT,TAPES=888888

ONXARCHIVE S  NOW=NO,CH=NO,ER=YES,TAPES=123456 PARAM CAT-ID=YES,UNLOAD=YES,STREAM=YES

Note:

Using the PARAM CAT-ID=YES option, ARCHIVE will not save the cat-ids with the file names. If the file list was created using an FSTAT command (FILENAME-SELECT : FSTAT ...), then the files will normally be displayed in the form: :x:$uid.filename. Specifying the NOC (NO Cat-ID) User Option will cause the cat-ids to be omitted.

Convert Files / Library Elements to another Format

ONXCONV [ 'str1'=... | PRE=prefix | SUF=suffix ] , attrib | ? [, opt]

The files/library elements marked with the Action Code X will be used as input for the conversion.

The names of the converted files will be those of the input files/library elements, unless:

- the string 'str1' is replaced by 'str2' (for more information, see page 5-),

- the name is prefixed: PRE=prefix (e.g. PRE=CONV.), or

- the name is suffixed: SUF=suffix (e.g. SUF=.CONV).

If neither 'str1'=..., nor PRE=prefix, nor SUF= suffix is specified, then the input file or input element is converted to a temporary file, and finally copied back to the original data object. The temporary file is then erased.

attrib Attributes of the output file. The attributes are defined in the syntax of a FILE or ADD-FILE-LINK command.

Example (parameter in FILE command syntax):

FCBTYPE=ISAM,KEYLEN=20,KEYPOS=8,BLKSIZE=(STD,16), SPACE=(64,64)

Example (parameter in ADD-FILE-LINK syntax):

ACCESS=*ISAM,SUPP=*DISK(ISAM=(KEY-LEN=20,KEY-POS=8)),BUFFER-L=*STD(16)

? The assisted SDF dialog screen of the /ADD-FILE-LINK (ADFL) command will be displayed.

The predefined values of first two parameters (LINK-NAME=OUTFCB and FILE-NAME=CFS...) may not be modified or deleted.

To modify the data structure, enter the following:

BLKCTRL= PAMKEY | DATA | DATA4K | NO

Example: ONXCONV BLKCTRL=DATA

The Variable Action ONXCONV BLKCTRL=NO will invoke the utility program PAMCONV to process program executables and PLAM libraries.

opt one or more of the following options:

Padding C'string' | X'string'

IK Insert Keys

EK Eliminate Keys

NA Non Ascending Keys

S Same attributes

LEN=n Logical record length

Padding Character string with which the output record will be padded if it is longer than the input record. Standard: C'_'.

IK Insert Keys: CFS will generate the ISAM keys for the output file automatically. The IK option can be used to create key fields even if the output file is a SAM file. In this case, the output records will have an 8 digit ascending sequential number after the record length field.

Standard: no IK, i.e. the ISAM key is contained in the data to be converted. If the ISAM key is not in ascending order, the NA (Non Ascending Keys) option should be given: see below.

EK Eliminate Keys: When converting from ISAM to SAM, the ISAM key will be removed from the input record.

Standard: no EK, i.e. if the input file is an ISAM file, the key will not be removed when converting the file.

NA Non Ascending Keys: When converting to an ISAM file, the input records contain the data for the ISAM key. These will not necessarily be in ascending sequence, so CFS will use the STORE macro instead of PUT. The NA statement will result in the input records being sorted.

Standard: no NA. A non-ascending key in the input record will lead to a DVS error.

S Same attributes: The output file will have the file attributes as specified in the ONXCONV... statement. All file attributes not specified will be taken from the input file.

The S option must always be the last option specified in the CONV Variable Action. It is only applicable as from BS2000 Version 9.5.

Standard: For all file attributes not specified with ONXCONV ..., the standard BS2000 values will be used: FCBTYPE=ISAM, RECFORM=V, BLKSIZE=(STD,1), KEYPOS=5, KEYLEN=8.

LEN=n specifies the total length of the output records. To achieve this length, the records are padded right with blanks. The four byte record length field is included in the LEN= statement. The catalog entry RECSIZE is not affected, and for variable length records will have the value RECSIZE=0.

Standard: The record length for output files with RECFORM=V will be determined by the input record.

Notes:

If the output file is to be in RECFORM=U format, the RECSIZE=8 parameter should be given (Register 8 is used by the program for the length of the output record).

It must be remembered when specifying attributes for the output file that those attributes that are not specified will have the respective standard values assigned to them. If no attributes are specified, the following standard values are used:

FCBTYPE=ISAM,KEYPOS=5,KEYLEN=8,RECFORM=V,BLKSIZE=(STD,1).

See example 2 below for more information.

The BLKCTRL parameter is an execption to the above rule on standard attribute values. If the attribute begins with BLKCTRL=, the output file will be defined with the same attributes as the input file, up to the BLKCTRL values, and PAD, if specified. See example 3 below.

The ONXCONV Variable Action can be used to convert SAM/ISAM files to PAM format, and vice versa. The following cases should be distinguished:

SAM/ISAM --> PAM    ( ONXCONV .... , FCBTYPE=PAM )

1) Input file: BLKSIZE = (STD,1)

The input file (SAM/ISAM) is read by PAM blocks, and written in PAM format to the output file. The data content is left unchanged. In this case, only the FCBTYPE entry in the catalog is changed to PAM.

2) Input file: BLKSIZE > (STD,1)

It is assumed that the first 16 bytes of each input record of the SAM/ISAM file (Recform=V) contains the PAM key data. Thereafter, 2048 bytes is expected for each PAM block.

PAM --> SAM/ISAM    ( ONXCONV .... , FCBTYPE=SAM/ISAM )

1) Output file: BLKSIZE = (STD,1)

ONXCONV ... ,FCBTYPE=SAM/ISAM,BLKSIZE=(STD,1)

The input file is transferred PAM block by PAM block to the output file. The data content is not changed. In this case, only the FCBTYPE entry in the catalog is changed from PAM to SAM/ISAM.

2) Output file: BLKSIZE > (STD,1)

e.g.: ONXCONV ... ,FCBTYPE=SAM/ISAM,BLKSIZE=(STD,2)

The first 16 bytes of each output record will contain the PAM key of the input blocks. Thereafter, 2048 data bytes from the PAM block will be appended.

Examples:

ONXCONV SUF=.F80,RECFORM=F,RECSIZE=80,FCBTYPE=SAM

The files marked with Action Code X will be converted to SAM files with RECFORM=F ,RECSIZE=80. The names of the converted files will be the same as the input files, but suffixed with '.F80'.

ONXCONV PRE=#,IK,LEN=300

The files marked with the Action Code X (either SAM or ISAM) will be converted to ISAM files using the standard file format: FCBTYPE=ISAM,RECFORM=V,KEYPOS=5,KEYLEN =8. The ISAM key will be generated, even if keys exist (IK). The output records are padded with blanks up to 300 bytes. If any input records are longer than 300 bytes, these will be truncated. The name of the output file will be the same as the input file, except that it will be prefixed with a '#' character (i.e. a temporary file).

ONXCONV BLKCTRL=DATA

The files marked with the Action Code X will be converted to the internal format BLKCTRL=DATA. The input file will be overwritten with the output file following a successful conversion. In contrast to the previous example, all input file attributes with the exception of BLKCTRL will be transferred to the output file automatically (i.e. without specifying the S option).

ONXCONV' '='.SAM',FCBTYPE=SAM,LEN=80

The files marked with the Action Code X will be converted to files with FCBTYPE= SAM,RECFORM=V,BLKSIZE=(STD,1). The output file names will be the same as the input names, but suffixed with '.SAM'.

ONXCONV' '='.SAM',FCBTYPE=SAM,EK,S

The files marked with the Action Code X will be converted to SAM files. In contrast to the previous example, the output file will only be cataloged as FCBTYPE=SAM. The RECFORM, RECSIZE and BLKSIZE values will be taken from the respective input files (S: Same attributes). If the input file is an ISAM file, then the ISAM keys will be removed from the records when converting to a SAM file. (EK: Eliminate Keys).

ONXCONV'.D.'='.D.NEW.',FCBTYPE=ISAM,KEYPOS=200,KEYLEN=20,IK

The files marked with the Action Code X are converted to ISAM files. The names of the output files are constructed by replacing the string '.D.' with '.D.NEW' . If any of the files marked with an X do not contain the string '.D.', then these files will not be converted.

The ISAM files thus created will have attributes of KEYPOS=200 and KEYLEN=20. The data for the ISAM keys will be generated by CFS itself, and does not have to be contained within the sequential input data (IK: Insert Keys). When generating the output file keys, CFS will follow these rules: The first 8 characters of the key are numerical (increment=10). If the key being created exceeds 8 bytes, then the succeeding positions will be set to binary zero.

Splitting a large sequential file into multiple identically-sized partial files

1) Display the original file with Action Code D.

2) Enter a PAM command (convert the file to PAM format). It is then possible to transfer physical PAM blocks from the input file to another file. In normal display mode, only single records can be written to another file.

3) Enter a CFS Write command, Wn,partfile-x. This will cause n PAM pages from the input file to be written to the partial file with FCBTYPE=PAM. The partial files must have different names.

4) Return to the CFS Selection mask (NP command), and select all the partial files.

5) Convert the partial PAM files created with the Write command to files with FCBTYPE=SAM: ONXCONV SUF=.SAM,FCBTYPE=SAM

PLAM: Convert Library Elements to Delta storage format

ONXCONV DELTA=vers

The PLAM library elements marked with the Action Code X will be created as a base element in Delta storage mode.

vers 1 to 10 digit numerical version description of the Delta element.

CFS will increment the version description by 1 at every successive modification of the library element. The number chosen when the element is created should cater for later increments dur to modification. E.g. ONXCONV DELTA=0001. This element may then be modified 9999 times.

Notes:

Only PLAM elements that do not contain B type records may be converted to Delta form. Program phases (Type=C) for example, and other PAM files archived as library elements cannot be converted.

For information on displaying Delta format PLAM elements in the file list, see pages 3- and 4-.

A prerequisite for processing elements stored in Delta format correcly is LMS Version 1.4 or above.

Copying Files / Librarys Elements / Job Variables with Name Transformation

ONXCOPY ['str1'=... [, vsn/device | :x: [,smspar] ] ] [, STD] ]

'str1'= ... Name Transformation Rules

'str1'='str2' | 'str1'=DP[n][I] | 'str1'=DS[n][I]

'str1'='str2'

The name of the copied data object is constructed by searching the original name for the string 'str1' and by replacing it with 'str2'. By default, the empty string '_' will appear at the end of every name, and the null string '' at the beginning.

'str1'=DP[n][I]

Delete Prefix: The name of the new data object will be constructed by searching the original name for the string 'str1' and deleting all, or n characters to the left. Specifying the I option will cause 'str1' to be deleted as well.

'str1'=DS[n][I]

Delete Suffix: The name of the new data object will be constructed by searching the original name for the string 'str1' and deleting all, or n following characters. Specifying the I option will cause 'str1' to be deleted as well. For further information, see page 5-.

vsn/device The copied files are created on the specified private volume.

:x: The copied files are created on the specified PVS.

smspar If the copied file is to be created on an SM pubset (System Managed pubset), this parameter, in conjunction with the associated system administrator default values, can be used to determine the storage location (Volume set) of the file.

If the prefix :x: is not specified before smspar, then smspar refers to the Default pubset.

AVAILABILITY=HIGH

The file should be stored within the SM pubset on a Volume set that is classified as higher availability (e.g. DRV mirrored volumes).

STORAGE-CL=class

Name of a Storage Class created by the system administrator. The Storage Class determines the Volume set of the file, and hence the storage characteristics, such as Performance Attribute, Availability etc.

VOLUME-SET=vset

Determines the Volume set on which the file should reside within the SM pubset. The system administrator can specify a volume explicitly by means of a one to four digit Cat-id vset (without the ':'), or *CONTROL.

The non-privileged user can only specify a Volume set when the system administrator has allowed physical allocation rights.

WORK-FILE=YES|NO

Specifies whether the file is a Work file, and hence may be deleted by the system administrator after a particular time period has elapsed. Work files will be created on Volme sets which have been designated WORK.

STD This parameter is only important when copying files or Job variables. Normally, the ONXCOPY Variable Action will pass the protection attributes of the source file, e.g. ACCESS=READ, RETPD or passwords, to the target file (COPY ..,SAME).

The STD parameter will result in the source file not being copied with "COPY ..,SAME". The protection attributes of the source file will thus not be copied automatically.

Notes:

Library elements will be copied to the current library. This Variable Action is translated internally to ONXADD 'str1'='str2' lib. The ONXCOPY Variable Action is only valid for PLAM libraries.

In contrast to the Copy command of BS2000, the attributes of the original file are transferred when using the ONXCOPY Variable Action (equivalent to COPY ,SAME). The files created or overwritten by the ONXCOPY Variable Action will have the same Share, Access and Backup Level attributes as the original files.

The PAMCONV program will be called internally by the Variable Action when copying files with BLKCTRL=PAMKEY to a nonkey PVS.

Copied files will automatically be added to the end of the file list.

Examples:

ONXCOPY''='ABC.S.' Prefix with 'ABC.S.'

e.g. TEST --> ABC.S.TEST

ONXCOPY' '='.88' Suffix with '.88'

e.g. ABC.S.TEST --> ABC.S.TEST.88

ONXCOPY''=''

This Variable Action is only relevant if the selected userid is not that under which the user logged on. The files/Job variables of the selected userid will be copied without name changes to the users own id.

Deleting Library Elements

ONXDEL The library elements marked with X will be deleted. For Delta elements, only the version displayed will be deleted.

Process Files/Lib.Elemente in a Connection with a DO Procedure

ONXDO [n] ['str1'=... ] { file library(element) | %name } [, do-params | ?]

All the flagged files / Library elements / Job variables will be processed in conjunction with a specified DO procedure. This will be achieved by using the flagged file or element name as the first positional parameter of the DO procedure. A main procedure will be created and a CALL made to the subprocedure. Finally, a branch is made to Connection n, and a DO command is executed for the main procedure.

n Connection number under which the created procedure should be executed. This connection must already exist, and must be under the same userid as the basic process of CFS. If no Connection number is specified, the DO procedure will be created but not executed.

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

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

a) Files/Job variables full file/JV name

b) FMS library element full element name

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

d) PLAM library elements  Element name without type and version number

If 'str1'='str2' is specified, the name, as described above, will be passed to the subprocedure as a parameter, but with string 'str1' being replaced by 'str2'. If the original name does not contain 'str1', the unaltered name will be used.

Examples:

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

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

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

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

file Name of the DO procedure to be processed in conjunction with the marked files/library elements.

lib(element)   The DO procedure is stored as a library element as specified. In PLAM libraries, it must be a type J element.

%name Name of the parameter set in the JRSAVE file. The parameter mask saved with the command SP %name will be presented. Using %name will create a relationship between a particular DO proc and predefined parameters.

do-params additional DO procedure parameters. These may not be specified together with %name.

? The parameter mask will be displayed. Normally, it is only displayed if parameters other than the first positional parameter (the file name) have not been specified.

Notes:

The procedure specified in the ONXDO statement must contain at least one positional parameter. CFS will provide the marked data object as this first positional parameter when starting the procedure.

If library elements are processed with ONXDO, the DO procedure must contain at least one other parameter for the library name. This should be specified in the definition of the Variable Action in the parameter mask.

The Variable Action ONXDO will create a DO procedure which contains the CALL for the sub-procedure with the marked files as positional parameters. This DO procedure will be named CFS.DO.tsn.hhmmss. tsn is the TSN of the CFS basic task, and hhmmss is the current time. The user is responsible for erasing this procedure.

In addition to the ONXDO Variable Action, see also the Variable Action ONXENTER on page 5-.

Example:

ONXDO1 CFS.DO.CONVERT

The procedure CFS.DO.CONVERT contains the following PROC statement:

/PROC C,(&FILE),SUBDTA=&



Assume that the user has selected files from his or her own userid, and that a connection has been opened with OC1/ to the same userid. All files marked with an X will be processed with the procedure CFS.DO.CONVERT. First, a temporary procedure called CFS.DO.4711.161411 (161411 = current time) will be created containing the following statements:



/PROC C
/CALL CFS.DO.CONVERT,(name-1,)
/STEP
/CALL CFS.DO.CONVERT,(name-2,)
/STEP
.....

/ENDP



After creating the procedure, CFS branches to the connection specified in the ONXDO command (Connection 1 in this example), and enters the BS2000 command /DO CFS.DO.4711.161411 from there. The user must erase the procedure afterwards if it is not required.

Generate DO procedures

ONXDPF outfil , param

DPF creates a DO procedure called outfil with the following structure:

/PROC A
expand-1
/STEP
expand-2
/STEP
....

/ENDP

The records expand-x (x = 1, 2, ...) will be generated from the param entries in the DPF statement according to the following rule: The param text will be transferred to expand. For each asterisk (*) in param, a file marked with X will be substituted. Following this process, an expanded record will be created for each marked file, whereby the actual file name will be substituted for the asterisk.

Examples:

ONXDPF DO.PROC-A,/CALL DO.TRANSFER,*

The file DO.PROC-A will be created with the following contents:

/PROC A
/CALL DO.TRANSFER,filename-1
/STEP
/CALL DO.TRANSFER,filename-2
/STEP
....

/ENDP

ON&DPF DO.PROC-B,/CATJV *,*.OLD,STATE=U

The file DO.PROC-B will be created with the following contents:

/PROC A
/CATJV jobvar-1,jobvar-1.OLD,STATE=U
/STEP
/CATJV jobvar-2,jobvar-2.OLD,STATE=U
/STEP
....

/ENDP

ONXDPF DO.COPY,/COPY *,*.NEW

With this, or similar commands, it is possible to run CPU-intensive file-oriented BS2000 commands in batch mode, without much difficulty, and without impinging on the dialog operation. For example, it could be used to copy many large files. The DO procedure thus created, DO.COPY, could then be run as an enter job from CFS (see Chapter 11, "Job Report System").

Write File Names

ONXDPF outfil     If the param operand is omitted, only a name record for each file marked with an X will be created in the following form

$user-id.filename ,filename

  <----------- 54 Chars --------> <-- 44 Chars ----->

The file will contain no other records, not even the procedure statements /PROC, /STEP and /ENDP.

This output file containing the file names can then be processed with EDT. For example, a command could be prefixed, or command operands could be suffixed. Inserting PROC and ENDP statements enables a DO procedure to be created easily from just these file names.

Process Files / Library elements / JV's with an EDT Procedure

ONXEDT [d] [,p,] [file library ( [t/] element) [, D] ]

Process all marked data objects with the specified EDT procedure (input file).

d EDT Level into which the data object should be read. Standard: 0

p EDT Level into which the Input procedure should be read. Standard: 1

file File which contains the EDT procedure.

library ( [t/] element)

Name of the library and element containing the EDT procedure. If the element is contained within a PLAM library, the element type can be omitted. The standard type S/ will be assumed.

The EDT Procedure will be read into EDT Level 1 by means of an @INPUT statement from the file or library element. Normally, the EDT statements must be prefixed with two '@' characters. For example: @@ON&C'...'T'...'

D After processing the EDT procedure, the parameter D will cause control to switch to EDT dialog via the @DIALOG command. The user can terminate dialog mode by pressing the K1 key. Note the remarks in the following paragraph regarding updating from the EDT virtual memory.

For each data object the process is performed as follows:

a) The data object is read into EDT Level 0.

b) Task switch 0 is reset (/SETSW OFF=0).

c) The EDT procedure read into EDT Level 1 by CFS with @INPUT will be executed with an @DO 1 command.

d) After processing the EDT procedure, or after pressing the K1 key to terminate the dialog mode, the processed data object will automatically be rewritten, so long as none of the following conditions are fulfilled:

   - Task switch 0 was not set (@SETSW ON=0), either by the EDT procedure or by the user.

   - EDT Level 0 was not erased (@DEL), either by the EDT procedure or by the user.

Notes:

The Variable Action ONXEDT is only available as from EDT V16.2.

Specifying the Variable Action ONXEDT without parameters will result in no EDT procedure being started. The user is placed in the EDT dialog mode for each data object for individual processing. The data object is not updated if the EDT Level 0 is erased with an @DEL command, or if the task switch 0 is set with @SETSW ON=0 before returning to CFS with the K1 key.

The input file can contain multiple EDT procedures (@PROC n ... @END).

After a data object has been successfully read into the EDT buffer, an SDF-P variable called CFSEDT will be filled by CFS as follows:

Col. Length Contents

1 54 Name of the file or library element

PLAM: Name without type or version description

55 8 PLAM: Element type, e.g. 'S'

63 24 PLAM: Element version

87 54 for library elements: Name of the library

141 1 Type of data object:

C'_' File

C'J' Job variable

C'P' PLAM element

C'L' LMS-ISAM element

C'F' FMS element

Example:

The input file called ASS.EDT contains the following statements to process assembler source programs:

@@DEL&:73-80:

@@ON&CA'='' 'T'=C'' '

The Variable Action ONXEDT ASS.EDT will delete columns 73 to 80 for all marked files/ library elements. The second statement will change all "='_" strings to "=C'_" .

Process Files / Library Elements with a DO Procedure in an Enter Job

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.

Find Character Strings in Files / Library Elements / Job Variables

ONXFIND [n,] param [ =W datei [, E|O] ] | =P ] [, NO] [, C[O] ] [, +-n|+n|-m ] [, NC] [, F] [, PD] [,SKIP[F]] [,TAPE] [,TYPE=t1,t2,...]

Search the contents or names of all marked files, library elements or Job variables for the occurence of one or more search criteria. The number of records or the element names which fulfill the search criteria are displayed on the screen. The count will be displayed, right-justified, in the Action Code field of the respective file if U (Update List) is given in answer to the termination query.

The option =W file will result in CFS creating a printable file with the names of the files in which the string was found. It will also contain the records in which the string occurred.

n Restrict the search to the first n records. (Standard: all records).

param single or multiple search argument.

single search argument: [ col ] [pitem

col Column range in which the string must begin.

:col1-col2: The first character of the string must begin between col1 and col2.

:col1: The string must begin at column col1.

>:col1: | <:col1: The string will be sought in the range from col1 to the end of the record (>), or from the beginning of the record to col1 (<)

Standard: The search is performed from the beginning to the end of each record.

p >    Search for a string  > item

<    Search for a string < item

-    Search for a string not equal to item

Standard: Search for a string = item

item Search string : C'string' | L'string' | X'string'

C'string' can be abbreviated to 'string' .

L'string': Lower case letters in string will not be converted to upper case.

If string contains apostrophes, these must be doubled.

Multiple Search - Format 1:  param [op param] [op param] .....

param single search argument according to the above syntax.

op Logical operator combining the two single search arguments.

  , Or operator.

  + And operator.

  * Wildcard operator: And operator, but in addition, the second search item must appear after the first. The optional parameter n determines how many separating characters must appear between the two items.

An unlimited number of search arguments can be combined with Or/And/Wildcard operators.

Notes:

The And/Or operation is restricted to a single record. This means that both search criteria must be contained within the same record.

A full description of the logical operators can be found on page 8-.

Multiple Search - Format 2:  ( )

Entering () will display a special search mask. The user then has 18 lines to enter any search arguments required. For a description of the search mask, see page 8-.

Multiple Search - Format 3:  %name | %? [, jrsave]

%name is the description of a parameter set to which a complex search argument had previously been saved with an SP %name command. For further information, see page 8-.

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

jrsave is the name of the file in which the parameter set is stored. Standard: CFS.JRSAVE [.jobname] .

Multiple Search - Format 4:  ( s-fil )

s-fil is the name of a SAM file containing the search arguments. For further information, see page 8-.

Multiple Search - Format 5:  ? | ?,%name

? will redisplay the last search argument to have been defined.

?,%name will redisplay the search argument stored in %name.

Saving the Search Results

ONXFIND... =W file [, E | O ]

The records in which the string was found will be saved to a printable file. The name of the respective data object will also be saved to the Write file. Only the name will be saved if the NO option (see below) was specified.

E The Write file is opened in Extend mode.

O The Write file is opened in Output mode.

Display the Search Results on Screen

ONXFIND ... =P

The records found to contain the search string are displayed on the screen. This option is equivalent to the Search command with a direct output of the result. For further information, see page 8-.

Scan only names of data objects for string

ONXFIND ..., NO

Names Only. Only the names of the files or library elements are scanned for the specified string. The name of the library elements whose name contains the search string will be written to the Write file. The scope of the NO option is primarily to search multiple libraries for elements with a particular name. See the second example below for such an application.

ONXFIND ..., NC

No Check for Continuation. Checking for the continuation of a BS2000 command, or a macro or source statement, is suppressed.

Normally, i.e. if the NC option is not specified, all records in BS2000 procedures, macros or source programs containing a continuation character are treated as a logical unit. If the string is found in one of the records, then all of the records of that logical unit will be written to the Write file. The physical record containing the string will be flagged with an 'X' in column 2.

ONXFIND ..., C

Standard: All records in procedures/macros/source programs will be treated as a logical unit linked to one another by continuation characters. This means, for example, that the search item 'FCB'*'BLKCTRL=DATA' will register a hit if the partial string 'FCB' occurs in one line and the partial string 'BLKCTRL=DATA' occurs later in another.

When writing the result records to another file, all records from each logical unit will be transferred to the output file. If the search string is contained completely within one of the partial records, this will be indicated by an 'X' in column 2 of the output file.

ONXFIND ..., CO

Check for Continuation Old mode. When searching a procedure, macro or source code, if a hit is found in a record containing a continuation character, then all other records containing continuation characters will also be transferred to the write file. In order to be recognised as such, the search string must be completely contained within one of the partial records.

ONXFIND ... , +-n | +n | -m

Surrounding records of the hit will be written to the output file.

+-n n records (1 <= n <= 250) before the hit, the record containing the hit itself, and n records after the hit will be written to the output file.

[+n] [-m] m records (1 <= m <= 250) before the hit, the record containing the hit itself, and n records (1 <= n <= 250) after the hit will be written to the output file.

ONXFIND ..., F

Find First. The search will be terminated after the first occurence of the string has been found, and a hit will be indicated. This option offers a quick way of determining whether or not the data object contains the search string. Normally, the search will be performed on all records occuring after the first hit as well. In this case, the number of hits will be correctly recorded.

ONXFIND ..., PD

Physical mode for archive Directories. ISAM files representing Archive directories will normally be searched at the logical level, i.e. at the level of the saved file names, resulting in a different format of the search hits. The PD parameter will cause Archive directories to be handled as normal ISAM files.

ONXFIND ..., SKIP[F]

SKIP Data objects not containing the search string will be removed from the file list with a '-' Action Code. These can be restored with a YANK command.

SKIPF Data objects which meet the search criteria are removed from the file list with the Action Code '-'. These entries can be restored with the YANK command.

ONXFIND ..., TAPE

Normally, tape files and migrated files will not be taken into account by the ONXFIND Variable Action. The TAPE parameter can be used to include these files. This will result in a request for the relevant tape to be mounted.

ONXFIND ...., TYPE=t1,t2, ...

This parameter is only relevant if files are being searched which actually represent a PLAM library.

The search will be restricted solely to library elements of the specified type. Example: TYPE=J or TYPE=J,S

By default, all elements in the library will be searched, regardless of type.

The =W file [, E | O ] option can also be entered in the Search mask (see: Multiple Search - Format 2), or in s-fil (see: Multiple Search - Format 4) after the last search string.

Notes:

In conjunction with the Write option (=W ..), the REWR command (Updating the original individual files or elements from the Write file) should also be noted. This REWR command (see page 7-) is the natural counterpart to the Write option.

If neither the E nor the O option is specified after the name of the Write file, then the following rules are valid:

If the Write file is opened for the first time in the current CFS run, it will always be in O (Overwrite) mode, i.e. the file will be created or overwritten.

If the same file is specified in multiple Variable Actions, it will be opened in Extend mode as standard.

The user can specify any mode with the E/O option.

In contrast to the FIND User Option, tape files may also be processed with the ONXFIND Variable Action.

If a BS2000 file representing a library is marked with an X and processed with an ONXFIND Variable Action, CFS will search the library at the element level, and not at the individual record or data block level. Multiple libraries can be checked in this way for the occurrence of a string in the data, or in the element name. The FIND Variable Action will display the total number of occurrences for all elements in a library, or the number of element names, which contain the specified string.

Examples:

ONXFIND 'D3470','D3475'=W CFS.D347X

All data objects marked with an X will be searched for the string 'D3470' or 'D3475'. Those records, together with the respective file/element name will be written to the file CFS.D347X.

ONXFIND 'A1015'=W L.FNDLIST,NO

Problem: a source program named A1015 needs to be found across multiple libraries, represented in the file list as BS2000 files. The necessary files are marked with an X. The Variable Action specified above will examine the names of all the elements of the flagged libraries for the string 'A1015'. The element names, together with their library names, will be written to the file L.FNDLIST. Answering U to the termination query will display the number of names fulfilling the search criteria in the Action Code field of each of the flagged files.

ON&FIND 10 '/FILE','/SET-FILE-LINK'=W CFS.FILE.RESULT

All files in the list will have their first 10 records examined for the string '/FILE' or 'SET-FILE-LINK'. All records containing at least one of the strings will be written to the file CFS.FILE.RESULT.

ONXFIND ''

If this Variable Action is carried out on a file that represents a library, the total number of records of all elements will be displayed as the result.

In connection with displaying the number of records in a file or library element, see also the RECNT (Record Count) User Option on page 4-.

ONXFIND ''=W CFS.ALL

All records from the data objects marked with an X will be written to the file CFS.ALL. This can also be compared to the ONXLIST Variable Action.

ON&FIND :1:'$A'=W #1

All selected Job variables (FCBTYPE=J) are searched for the string '$A' in column 1. A list of the names of these Job variables, together with their contents, will be written to the file #1. This file can be printed with SPACE=E.

Further examples of search arguments, in particular the combination of multiple arguments, can be found in Chapter 8 "CFS Display/Editor", in the "Searching for Character Strings (multiple search arguments)" section.

Compress Files with FLAM

ONXFLAM [ 'str1'=... [, par ] ] [, flam-par ]

The files marked with the Action Code X will be compressed using the FLAM Access Method. The result after compression is always a SAM file.

To use this Variable Action, the FLAM software product must be available.

'str1'=... Name transformation rules. See page 5-.

par :x: | vsn/device

:x: The compressed files are created on the specified Public Volume Set.

vsn/device The compressed files are created on the specified private volume.

flam-par FLAM-specific parameters, e.g. FC=ISAM,RECFORM=VAR. A full description of the FLAM parameters can be found in the FLAM User Guide, Chapter 3, "Interfaces". FLAM parameters may only be specified as from FLAM Version 2.0.

Notes:

If no FLAM parameters are specified, CFS will substitute the parameter INFO=NO. FLAM will display only error messages on the screen.

Specifying the Variable Action without 'str1' and 'str2', as well as without vsn/device (ONXFLAM [flam-par] ), will cause the compressed file to have the same name as the original. The original file will be overwritten.

The system administrator can set a particular BACKUP level as identifier for compressed files. In this case, CFS will set the file to the required BACKUP level (CAT command) following successful compression. In this way, compressed files can be easily identified by their BACKUP level. (CFS User Option: BACKUP).

Compressed files can be handled in Display mode without first being decompressed. For further information, see the DA FLAM command on page 8-.

When decompressing the data (DFLAM), the BACKUP level is reset to the standard BS2000 value.

Decompress Files with FLAM

ONXDFLAM [ 'str1'=... [, par ] ] [, flam-par ]

The files marked with the X Action Code will be decompressed using the FLAM Access-Method. The file compressed earlier with ONXFLAM will be restored with all its original attributes, such as Recform, Recsize, Blksize, Keylen, Keypos. The attributes Share, Access, Audit, etc. are not saved, and so cannot be restored.

'str1'=... Name transformation rules. See page 5-.

par :x: | vsn/device

:x: The decompressed files will be created on the specified Public Volume Set.

vsn/device The decompressed files will be created on the specified private volume.

flam-par FLAM-specific parameters (see User Guide "FLAM Version 2.0").

These parameters could not be specified in FLAM Version 1.

Notes:

The FLAM software product must be available to use this Variable Action.

If no FLAM parameters are specified, CFS will substitute the parameter INFO=NO. FLAM will display only error messages on the screen.

Specifying the Variable Action without 'str1' and 'str2', as well as without vsn/device (ONXFLAM [flam-par] ), will cause the decompressed file to have the same name as the original. The original file will be overwritten by the decompressed file.

Compressed files can be handled in Display mode without first being decompressed. For further information, see the DA FLAM command on page 8-.

Transfer Files / PLAM Library Elements with FT-BS2000


With a mouseclick you get a describtion of the screen item.

ONXFT ['str1'=...] [%name | %? [,JRS=jrfile|,?] [,]] [host2] [, user-id2] [, acct-nr2] [, passw2] [, rem-succ] [, rem-fail]

[, rem-par] [, direct] [, lst] [, time]

If no operands are specified, they will be requested from a special FT parameter mask (see above).

'str1'=... The name of the file in the target system will be created such that 'str1' will be sought in the source file name and replaced by 'str2'. By definition, every name is prefixed with an empty string '', and suffixed with a blank string '_' . If the source file does not contain 'str1', the file will not be transferred.

For more information on Name transformation rules see page 5-.

If this operand is not specified, the target file name will be the same as the source file.

%name The File Transfer parameters will be taken from the specified parameter set.

%? All relevant parameter sets will be displayed in a mask, from which one may be selected by marking it.

JRS=jrfile Name of the JRSAVE file in which the parameter set is stored.

Standard: CFS.JRSAVE.xxxx. For further information, see page 27-.

? The FT screen will be filled with the contents of the parameter set and the user can modify it as required. Normally the FT screen will not be displayed.

Notes:

The File Transfer parameters activated by the parameter set can be modified directly by specifying parameter values such as host2, user-id2 etc.

Saving the last FT parameters to have been used to a parameter set is achieved by means of the SP FT%name command. For further information, see page 7-. When saving the parameter set, any defined FTEP parameters will be retained.

host2 Symbolic name of the remote host computer.

The name specified as host2 is not the host name generated in PDN, but the partner name defined in the FT parameters.

user-id2 Userid in the remote system to which or from which the file should be transferred.

Standard: same userid as on the local system.

FTAC: As an alternative to a remote userid, an FTAC Transfer-Admission parameter may be specified for the remote system. To do this, the constant "FTAC:" should be entered in the "Remote User-Id" field, followed by the actual Transfer-Admission. When entering a Transfer-Admission, particular care must be taken, since FTAC profiles are case sensitive. CFS will not convert lower case letters to upper case.

acct-nr2 Account number.

Standard: the same account number as in the local system.

passw2 Logon password of the userid in the remote system ( [C]'...' | X'...' ).

Standard: no password.

rem-succ Remote Success Procedure. The name of a procedure to be executed in the event of the transfer being successful.

proc,* The DO procdure specified as proc will use the name of the transferred file as a parameter.

/cmd .... Following the successful transfer of the file, the specified BS2000 command will be executed on the remote system. If an '*' is specified anywhere in the command, the name of the transferred file will be substituted at that point. Multiple BS2000 commands, separated by semicolons, may be specified (/cmd1 ...;/cmd2 ...).

'/cmd ...' Following the successful transfer, the specified command will be executed on the remote system. In this case, however, an '*' will not be substituted with the file name.

Standard: no Remote Success Procedure.

rem-fail Remote Failure Procedure. The name of a procedure to be executed in the event of the transfer failing.

proc,* The DO procdure specified as proc will use the name of the transferred file as a parameter.

/cmd .... Following the unsuccessful transfer of the file, the specified BS2000 command will be executed on the remote system. If an '*' is specified anywhere in the command, the name of the transferred file will be substituted at that point. Multiple BS2000 commands, separated by semicolons, may be specified (/cmd1 ...;/cmd2 ...).

'/cmd ...' Following the unsuccessful transfer, the specified command will be executed on the remote system. In this case, however, an '*' will not be substituted with the file name.

Standard: no Remote Failure Procedure.

rem-par Remote Parameter (Type of remote system).

possible values: *BS2000 | *MSP | *ANY | *any

*BS2000 BS2000 target system.

*MSP MVS target system.

*ANY Other target system (SINIX/VMS/AMBOSS/..). File names will be transferred to the remote system in upper case.

*any Other target system, e.g. SINIX. BS2000 File names will be transferred to the remote system in lower case.

Standard: *BS2000.

direct Transfer Direction.

possible values: FROM | TO

Standard: TO.

lst Listing. Should a listing be produced for each transferred file?

Specifying YES will result also in CFS activating the Job Report System after termination of the file transfer request, and displaying the results on screen.

possible values: YES | NO

Standard: NO.

time hh:mm Do not start the transfer before the specified time.

If the specified start time has already passed, the transfer will begin at that time the following day.

Standard: Start the transfer as soon as possible.

" modify Extended Parameters for FT " (last field in the FT mask):

Entering Y in this field will display the File Transfer Extended Parameter mask (FTEP mask). Additional parameters needed less often can be specified for future transfers in this screen. For example, the "Local Transfer Admission Userid, Acct-Nr, Password", parameters, as well as "Local Success Procedure", "Local Failure Procedure" can be specified. These additional parameters may also be specified using the FTEP param command or by calling the FTEP mask directly (FTEP command, see page 7-) before the first FT call.

Standard: N (no display of the FTEP mask).

Notes:

If the parameters up to and including acct-nr2 are specified explicitly in the ONXFT statement, the FT parameter mask will not be displayed, and the standard values will be used for the unspecified parameters.

If PLAM elements are transferred to another BS2000 system, the elements will be created in the remote system under the same name, and in a library of the same name.

When transfering files with the ONXFT Variable Action, any necessary read passwords will not be requested dynamically.

The termination of FT requests can be monitored by the CFS Job Report System as from FT-BS2000 Version 3 by specifying the FT parameter Protocol-Listing: YES. For further information, refer to the JRFT/ NJRFT commands on page 11-.

To select all files being transferred, refer to the NSTAT option in the FILENAME-SELECT field in the selection mask.

For further information about file transfer - in particular between BS2000 and SINIX systems - refer to Chapter 12 "File Transfer with FT-BS2000 / RDAC".

Example:

ON&FT HOST5,USER5,A001,C'12345',,,,,YES

All files in the list will be transferred to the remote system named HOST5. The remote userid, account number and logon password are: USER5,A001,C'12345'.

The remote system is a BS2000 system (Standard value).

A listing will be produced for each transferred file.

Set Guard Protection for Files / Library Elements


With a mouseclick you get a describtion of the screen item.

ONXGUARD  [%name|%? [,JRS=jrfile]] [R=guard|*NONE|*SAME] [,W=guard|*NONE|*SAME] [,E=guard|*NONE|*SAME]

The files/PLAM library elements marked with X will be provided with Guard protection. If no parameters are specified, they will be requested via a mask (see above).

%name The parameter values for the ONXGUARD Variable Action will be taken from the specified parameter set. Saving a parameter set can be done by entering the CFS command SPGUARD %name.

%? All relevant parameter sets will be displayed in a list, from which one may be selected by marking it.

JRS=jrfile Name of the JRSAVE file in which the parameter set is saved.

Standard: CFS.JRSAVE.xxxx. For further information, see page 27-.

R=guard Read access to the data object is protected by a Guard of the specified name. Like a file, a Guard can possess a PVS-id, a userid and a name. The name is restricted to 8 characters.

R=*NONE File: Read access is protected by an empty Guard, and is thus not allowed.

PLAM Element: Read access is monitored neither by a Guard, nor by Basic Access Control (BACL).

R=*SAME The read access attributes of the data object are not changed.

W=guard Write access to the data object is protected by a Guard of the specified name. Like a file, a Guard can possess a PVS-id, a userid and a name. The name is restricted to 8 characters.

W=*NONE File: Write access is protected by an empty Guard, and is thus not allowed.

PLAM Element: Write access is monitored neither by a Guard, nor by Basic Access Control (BACL).

W=*SAME The write access attributes of the data object are not changed.

E=guard Execution access to the data object is protected by a Guard of the specified name. Like a file, a Guard can possess a PVS-id, a userid and a name. The name is restricted to 8 characters.

E=*NONE File: Execution access is protected by an empty Guard, and is thus not allowed.

PLAM Element: Execution access is monitored neither by a Guard, nor by Basic Access Control (BACL).

E=*SAME The execution access attributes of the data object are not changed.

Notes:

For files the following is valid: If the value *NONE is entered for all three access types (R/W/E), Guard access control is disabled completely. The file is then protected only by SHARE=YES|NO,ACCESS=READ|WRITE. The same effect can be achieved by entering the SGN (Set Guards None) Action Code.

When protecting PLAM elements with the ONXGUARD Variable Action, the existence of the specified Guards are not checked. If access of a particular type, e.g. R (Read) is protected with a non-existent Guard, then that access (e.g. Read) will be prohibited to all users until a Guard with the specified name is created.

Example:

ON&GUARD R=:C:$TSOS.READG,W=$TSOS.WRITEG,E=$TSOS.EXECG

All files in the file list will be protected with the following Guards:

Read access: Guard :C:$TSOS.READG

Write access: Guard $TSOS.WRITEG

Execute access: Guard $TSOS.EXECG

Migrate / Recall Files with HSMS

ONXHSMS [MIGRATE] [, TO=S1|S2] [, COMP=YES|NO] [, INHIBIT=IGNORE|RESPECT]

ONXHSMS RECALL [, EXP=YES|NO] [, LOC=BEST|SAME|cat-id]

The ONXHSMS Variable Action offers the CFS user the possibility of migrating and recalling files from storage media using HSMS.

MIGRATE The files marked with X (ONX), or all files (ON&) will be migrated to a different storage medium using the HSMS utility program. A CFS procedure will be created containing the following HSMS statement:

//MIGRATE-FILES FROM-STORAGE-LEVEL=*S0-STORAGE-LEVEL(...).

As from OSD V3.0 it must be ensured that files on different SM pubsets are not processed simultaneously in one HSMS run. This restriction is also relevant for files that reside partially on SF and SM pubsets.

TO=S1|S2 The files will be migrated to the specified storage level.

This parameter corresponds to the HSMS statement //MIGRATE-FILES, parameter TO-STORAGE=*S1-STORAGE-LEVEL|*S2-STORAGE-LEVEL

Standard: S2

COMP=YES|NO

Determines whether or not the files should be compressed prior to being written to the storage medium. This parameter corresponds to the HSMS statement //MIGRATE-FILES, parameter COMPRESS-FILES=*YES|*NO

Standard: If this parameter is not specified, the default setting from the archive definition of the pubset will be used.

INHIBIT=IGNORE|RESPECT

This parameter is reserved for the system administrator. It determines whether or not the migration bar set in the file's catalog entry can be ignored or not. this parameter corresponds to the HSMS statement //MIGRATE-FILES, parameter FILE-INHIBIT=*RESPECTED|*IGNORED

Standard: Under TSOS, if this parameter is not specified, the default setting from the archive definition of the pubset will be used.

Under any userid other than TSOS, the RESPECT value is always used.

RECALL The files marked with X (ONX), or all files (ON&) will be recalled from the background storage level (S1/S2 level) to the processing level S0. The advantage of a ONXHSMS RECALL Variable Action compared to an implicit recall by simply opening the file is that each file will not generate its own HSMS job.

The procedure generated by CFS will contain the following HSMS statement:

//RECALL-MIGRATED-FILES.

As from OSD V3.0 it must be ensured that files on different SM pubsets are not processed simultaneously in one HSMS run. This restriction is also relevant for files that reside partially on SF and SM pubsets.

EXP=YES|NO

This parameter is reserved for the system administrator. It will determine whether or not the job should be started as an Express job.

This parameter corresponds to the HSMS statement //RECALL-MIGRATED-FILES, parameter OPERATION-CONTROL=*PAR(EXPRESS-REQUEST=*YES|*NO)

Standard: NO

LOC=BEST|SAME|cat-id

This parameter is only permitted from OSD V3.0. It will determine to which Volume set the file should be restored, if it had been migrated from an SM pubset.

BEST The file will be restored to the best available Volume set corresponding to it's attribute (e.g. High Performance, High Availability).

SAME The file will be restored to the same Volume set on which it existed prior to it's migration.

cat-id Identification of the Volume set within the SM pubset to which the file should be restored.

This parameter corresponds to the HSMS statement //RECALL-MIGRATED-FILES, parameter ENVIRONMENT=*SYSTEM-MANAGED(NEW-DATA-LOCATION= *BEST-VOLUME-SET|*SAME|cat-id)

Standard: BEST

Notes:

The Variable Action creates a DO procedure with the required HSMS statements. The user can start this DO procedure immediately under control of the Job Report system, and have it monitored by CFS.

The following HSMS parameters will be inserted automatically into the generated job:

FILE-NAMES=*FROM-FILE(LIST-FILE-NAME=listfile)

OPERATION-CONTROL=*PAR(WAIT-FOR-COMPLETION=*YES,REPORT=*FULL, OUTPUT=protfile)

The listfile will be created automatically by CFS, and will contain the names of all files to be processed. This file will be deleted automatically following the successful execution of the HSMS job.

The protfile will be created initially as a temporary file. It will only be copied to a permanent file should the HSMS job terminate with an error.

As from OSD V3.0, the additional parameter ENVIRONMENT=*SYSTEM-MANAGED (PUBSET-ID=cat-id) will be inserted for a //MIGRATE-FILES statement for those files stored on an SM pubset. The PVS-ID of the first file to be migrated will be used as the cat-id. If this first file to be migrated resides on an SF pubset, then the parameter ENVIRONMENT=*SINGLE-FEATURE will be inserted.

Copy File Descriptions (INF Text)

ONXICOPY cat1, cat2 [, UPD ]

The information text for the files marked with X will be copied from the information catalog cat1 to cat2.

UPD cat2 will be opened with OPEN=INOUT instead of OPEN=OUTPUT (Standard).

Notes:

This Variable Action is aimed at reorganising Inf catalogs, which perhaps contain information from files that have been erased. Current files containing information text can be selected with the User Option INF Y. The Inf text associated with these files can be copied to a new information catalog, cat2, with ON&ICOPY cat1,cat2. The old catalog can then be erased.

For a full description of the documentation text system, see Chapter 13 "File Information System".

Restore Files from Archive to Disk

ONXIMPORT ['str1'=...] [TO=PUBLIC|vsn|(vsn,...)] [, DEVICE=device] [, REP=YES|NO|ALL| ALLP] [,SPACE= REORG|KEEP] [, PASSWORD= ...] [_PARAM_....]

The ONXIMPORT Variable Action can only be processed in conjunction with an Archive directory list created by DIR directory. IMPORT allows files or Job variables that were saved with the EXPORT or DEXPORT Archive statements to be restored to the system under the same name or to different names.

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

TO=PUBLIC|vsn|(vsn,...)

Corresponds to the Archive operand TO=... in the FILES statement.

The TO= parameter will result in the restoral of the files to the specified private volume, or to public space.

Standard: If the TO= operand is not specified, the files will be restored to the original private volumes from which they were saved, or back to public.

DEVICE=device

Only used in conjunction with the TO=vsn (see above), this parameter identifies the device type for the specified private volume.

REP=YES|NO|ALL|ALLP

Corresponds to the Archive operand REPLACE=... in the [D]EXPORT statement.

This parameter determines whether existing files of the same name will be overwritten or not. For further information, see the ARCHIVE User Manual, IMPORT statement.

SPACE=REORG|KEEP

Corresponds to the Archive operand SPACE=... in the [D]EXPORT statement. This parameter determines whether the existing file will be deleted prior to it being replaced or not. For further information, see the ARCHIVE User Manual, IMPORT statement.

PASSWORD=passw|(passw,...)

Corresponds to the Archive operand PASSWORD=... in the [D]EXPORT statement.

This parameter allows any necessary read passwords for the saved files to be entered. The system administrator does not need to specify passwords. For further information, see the ARCHIVE User Manual, IMPORT statement.

PARAM ... Corresponds to the PARAM Archive statement in an IMPORT process.

General Archive settings can be set here, such as,

OPERATOR=YES|NO,RESTART=YES|NO,WRCHK=YES|NO,SNR=YES|NO,STREAM=YES|NO . For further information, see the ARCHIVE User Manual, PARAM statement.

The CATID=YES|NO operand may not be set in the PARAM statement, since CFS sets it automatically depending on the value already set in the Archive directory.

The PARAM statement must be specified last, and must be separated by a blank from the preceding parameters.

Output Files / Library Elements / Job Variables to a Print File

ONXLIST [m,] outfil [, E|O] [, TOC] [, HTML] [,Ln] [, W [c] ] [, H] [, H4] [, NN] [, RH] [, NH] [, IOH]

The contents of all files/library elements/Job variables flagged with an X will be written to the output file outfil. outfil is print-ready, and may be printed with SPACE=E.

m Only the first m records of each of the input data objects will be listed.

E The output file will be opened with OPEN=EXTEND.

O The output file will be opened with OPEN=OUTPUT. (Standard).

TOC Table of Contents. A Table of Contents will be created in the output file of all listed files/library elements. The Table of Contents will contain the names of all listed files, as well as the page on which the file begins in the output listing. The individual pages in the printable output listing will be numbered sequentially as a result of specifying TOC.

Standard: no Table of Contents in the output file.

HTML HTML-formatted Table of Contents for viewing the output file through an internet browser. The Table of Contents contains the name of the objects and an HTML hyperlink to the start of the relevant object. When using a browser, clicking on the name of the object will take the user straight to the start of the object.

Standard: no Table of Contents in the output list.

L n Number of lines per print page. n: two or three digit number.

Standard: L=64. The system administrator can set the standard value to match the value normally used in the computer centre (CFSMAIN).

W [c] Wrap. Records longer than c bytes will be continued on the following line. c is a number less than 256 which defines the last print column per line. If c is not specified, the standard value of 132 will be assumed. The system administrator can set the standard value to match that used in the computer centre (CFSMAIN).

Standard: Wrap mode not set. Each file record is displayed on a single line in the output file. An output record can be up to 2036 bytes long. When printing with SPACE=E, these records will be truncated at Column 132.

H Hexadecimal output.

The output will be analogous to that of the Display mode of CFS when a DL or H (Display Long, Hexadecimal) command has been entered, or to that of the BS2000 dump format. For each record of the output file, the 40 left-most bytes will be displayed in hexadecimal format, and the 40 right-most bytes will be displayed in character format.

Standard: No hexadecimal representation.

H4 Four line hexadecimal output.

The output will be analogous to the hexadecimal mode of EDT. Four lines of the output file are used for 80 bytes of data. Line 1 contains a ruler. Line 2 contains the character representation of the data. Lines 3 and 4 contain the most and least significant half-bytes for each byte. The position of the keys in ISAM files are indicated by displaying KK...KK in the ruler line.

Standard: No hexadecimal representation.

NN No Numbers. The records are displayed without record numbering.

Standard: With record numbering for SAM and PAM files.

NH No Header. The records will be listed without the header "FILENAME: xxxx" , nor will it contain any printer control codes.

The No Header option of the ONXLIST Variable Action can be used to concatenate multiple files into a single sequential file with attributes of FCBTYPE=SAM, RECFORM=V, BLKSIZE=(STD,1).

RH Reduced Header. A header containing the file or library and element name will be inserted at the beginning of each listed data object. The individual records will be listed without printer control information, as for NH (No Header).

IOH Insert only Header. The files to be listed will be prepared for printing. The files will be taken with the existing form control characters. CFS will insert an additional header page for each file.

Notes:

The NH / RH parameters are not evaluated in conjunction with TOC.

The W (Wrap) parameter is normally set for H and H4.

PAM files can only be listed with ONXLIST in the H or H4 mode.

When listing the contents of Job variables, the RH parameter (Reduced Header) should be used: ONXLIST outfil,RH.

Save File or Job Variable Catalog Entries to a File

ONXLISTCAT outfil [, VERSION=0 | 2 | 3] [, E]

outfil This Variable Action will write a variable length record consisting of the complete catalog entry relating to the file or job variable marked with X, into the file outfil.

VERSION=0 This parameter is primarily to be used for diagnostic purposes, and will cause the catalog entries to be written in the old BS2000 V10-compatible format. A file created with the VERSION=0 paramaeter can be processed with a RECAT command. Reconstruction of the Guard attributes is not possible.

VERSION=2 This parameter is applicable from OSD V1 and is primarily to be used for diagnostic purposes, and will cause the catalog entries to be written in the new FSTAT layouts of OSD V3. A file created with the VERSION=2 parameter cannot be processed with a RECAT command.

VERSION=3 This parameter is only available to the system administrator under the TSOS userid. The physical catalog entry will be written to the file, and the format will be determined by the DSECT DCACATE MF=D,CETYPE=*FILE | *JV macro.

A file created with the VERSION=3 parameter cannot be processed with a RECAT command.

If a listcat file is to be used later with a CFS RECAT command (see page 7-), the VERSION= parameter should not be used.

E Extend. This option will cause an existing file to be opened in OPEN=EXTEND mode.

Notes:

In addition to listing the catalog entries for Job variables with the LISTCAT Variable Action, the Job variable data contents will also be stored. Using the CJ (Create Job variables) option in the RECAT command (see below), it is possible to recreate Job variables with previous contents, even if the Job variable no longer exists. This method can also be used to create Job variables on a remote system as follows: transfer the Listcat file with File Transfer, then issue a RECAT file,CJ command on the remote system.

The RECAT command can be used to process catalog list files produced with LISTCAT. RECAT will check the current file attributes against those stored in the LISTCAT file. Any discrepancies will result in a CAT command being executed which will reset the attributes to their earlier values. For a full description of the RECAT command, see page 7-.

If CFS is loaded from a userid other than TSOS, any passwords will be overwritten with binary zeroes.

Move: Transfer Files to another Volume / Public Volume Set (PVS)

ONXMOVE :x: [,smspar] [,vsn/device] | vsn/device | [PUBLIC | DEFCAT] [,smspar] [, A] [, ED]

:x: The files marked with X will be copied under the same name to the specified Public Volume Set and erased from the original set.

smspar If the file is to be moved to an SM (System Managed) pubset, then the location of the file (Volume set) can be determined more precisely by means of this parameter, and the defaults set by the system administrator.

If the parameter :x: is not specified before smspar, then smspar will be applied to the default pubset of the userid.

AVAILABILITY=HIGH

The file should be located within the SM pubset on a Volume set composed of protected volumes, such as DRV-mirrored drives.

STORAGE-CL=class

Name of a Storage class created by the system administrator. The Storage class determines the Volume set for the file, and hence the storage characteristics such as Performance Attribute and Availability.

VOLUME-SET=vset [,S0-MIGRATION=*ALLOWED|*FORBIDDEN]

Determines the Volume set within the SM pubset on which the file should be located. The system administrator can specify a Volume set explicitly , either by means of *CONTROL, or by specifying a one to four character Cat-Id vset (without the ':').

Non-privileged users can only specify Volume sets explicitly if the system administrator has granted physical allocation rights.

VOLUME-SET=vset,S0-MIGRATION=*ALLOWED

By default, when issuing a MOVE command to a specific Volume Set of a PVS, the attribute S0-MIGRATION can be set to FORBIDDEN. The parameter S0-MIGRATION can now be used to set the attribute to ALLOWED, as is usually the case before a MOVE operation.

WORK-FILE=YES|NO

Specifies whether or not the file is classified as a Work file, which may be deleted by the system administrator after a pre-determined time. Work files are created on Volume sets which have been designated as a WORK Volume set.

vsn/device The files marked with X will be copied under the same name to the specified private volume, and erased from the original device.

PUBLIC The files marked with X will be copied under the same name to public discs and erased from the original device.

DEFCAT The files marked with the Action Code X will be created under the same name in the public area of the Default pubset of the respective userid, and then deleted from the original volume.

A All. The Move operation will also be executed for empty files.

Notes:

The ONXMOVE Variable Action cannot be executed for File Generation Groups. To move an FGG to another PVS it must first be selected with the VOLUME :FGG parameter, and then copied with the Variable Action ONXCOPY''=':pvs:'.

The Variable Action will call the PAMCONV program internally when moving files with BLKCTRL=PAMKEY to a nonkey PVS.

ED Erase Destroy. The file on the source volume will be overwritten with binary zeroes.

Examples:

ONXMOVE PVT001/D348E

The files marked with X will be moved to the private volume PVT001, and erased from the original devices.

ONXMOVE :G:

The files marked with X will be created on the PVS :G: and erased from the original PVS.

Mark Open Files to be Saved

ONXOPNBACK [= Y | N]

Normally, a file which has been opened in Write or Update mode (Open=Output/Update /Extend/Inout/Outin) cannot be backed up with ARCHIVE. This Variable Action will set a bit in TSOSCAT which will enable the file to be secured in spite of its Open status. A prerequisite for this is BS2000, from OSD V1.0, and that PARAM OLS=YES has been specified. The user is responsible for the consistency of the data in this case.

The file may not be locked when the OPNBACK Variable Action is executed. The ONXVERIFY Variable Action can be executed beforehand.

The possibility of saving open files was primarily meant for UDS databases. Another use would be for example for PLAM libraries that contain active SYSOUT files. Although a restore operation may result in an individual element being in an inconsistent state, this option does at least provide the possibility of saving an open library.

Y The OPNBACK indicator should be set permanently in the system catalog for the marked files.

N The OPNBACK indicator should be reset for the marked files.

Transfer Files with RDAC to another Host / PC

Print Files / Library Elements on a Station Printer


With a mouseclick you get a describtion of the screen item.

ONXRDAC ['str1'=...] [host2] [,user-id2] [,acct2] [, passw2] [, rem-succ] [,direct]    [,print] [,time]

If no operands are specified, they will be requested from a special FT parameter mask (see above).

'str1'=... The target file name is constructed such that the source file name will be searched for 'str1' and replaced by 'str2'. By definition, every name is suffixed with a blank string '_', and prefixed with an empty string '' . If the source file does not contain 'str1', the file will not be transferred.

If this operand is omitted, the files will have the same name in the remote system as in the local system.

host2 Symbolic name of the remote system.

The name host2 is not that defined in PDN, but the partner name of the called system according to the RDAC generation.

user-id2 Userid in remote system to which or from which the file should be transferred.

Standard: same userid as on the local system.

acct2 Account number.

Standard: same account number as on the local system.

passw2 Logon password for the userid on the remote system ( [C]'...' | X'...' ).

Standard: no password.

rem-succ Remote Success Procedure. The name of a procedure to be executed in the event of the transfer being successful.

proc,* The DO procedure specified as proc will use the name of the transferred file as a parameter.

/cmd .... Following the successful transfer of the file, the specified BS2000 command will be executed on the remote system. If an '*' is specified anywhere in the command, the name of the transferred file will be substituted at that point.

'/cmd ...' Following the successful transfer, the specified command will be executed on the remote system. In this case, however, '*' will not be substituted with the file name.

Standard: no Remote Success Procedure.

direct Transfer direction.

possible values: FROM | TO

Standard: TO.

print should the file be printed on a remote printer?

possible values: NO | YES | form [, pr-params

Specifying a value other than YES or NO will be interpreted as a form description, and will result in the file being printed with the specified string being used as the FORM parameter.

One or more print parameters can optionally be specified after YES | form as follows:

pr-params SPACE= | COPIES= | HEADER= | LINES=nn

Standard Print ? : NO.

time hh:mm The transfer should not begin before the specified time.

Standard: The transfer should begin as soon as possible.

Notes:

If the parameters up to and including acct-nr2 are specified explicitly in the ONXRDAC statement, the RDAC parameter mask will not be displayed, and the standard values will be used for the unspecified parameters.

For further information on transfering files with RDAC - in particular file transfer between BS2000 and MS-DOS systems - see Chapter 12 "File Transfer with FT-BS2000/RDAC".

Rename Files / Library Elements / Job Variables

ONXREN 'str1'=...

'str1'='str2' The new name is constructed such that the original name is searched for 'str1' and replaced by 'str2'. By definition, every name is suffixed with a blank string '_', and prefixed with an empty string ''

For more information on Name transformation rules see page 5-.

If the name does not contain 'str1', the REN Variable Action will not be executed for this data object.

Examples:

ONXREN'KLM'='S'

The first occurrence of the string 'KLM' will be replaced by 'S'.

e.g. AB.D.KLMDATA --> AB.D.SDATA

ONXREN''='ABC.'

The names will be prefixed with 'ABC.' .

ONXREN' '='.X'

The names will be suffixed with '.X' .

ONXREN' /'='001/'

This Variable Action will cause all blank version descriptions ( .../___/... ), of an LMS-ISAM library to be replaced by 001 (.../001/... ).

ONXREN'/###'=''

This Variable Action will result in any one to three character version descriptions being removed from PLAM elements. For longer version descriptions, more # characters should be specified.

Notes:

A userid cannot be changed with the REN Variable Action, i.e. it is not possible to rename data objects across userid's.

PLAM library elements can be prefixed using the REN Variable Action as follows: ONXREN'/'= '/prefix.' .

Example: ONXREN'/'='/NEW.' (S/XYZ/001 --> S/NEW.XYZ/001)

Reorganise Libraries / ISAM Files

ONXREORG ['str1'=...] [, par]

The marked libraries/ISAM files will be reorganised, in so far as all elements/ records will be transferred to a new library/file.

The REORG Variable Action will remove "holes" from a library created by frequent deletions and additions to and from the library. The library will be "repacked", and will occupy less space afterwards.

'str1'=... The name of the library to be reorganised is constructed such that a search is made in the name of the library or ISAM file for 'str1', and if found, will be replaced by 'str2'. By definition, every name is suffixed with a blank string '_', and prefixed with an empty string ''

For more information on Name transformation rules see page 5-.

If the name does not contain 'str1', the REORG Variable Action will not be executed for this data object.

If the 'str1'='str2' operand is omitted, the temporary file created will be copied back to the original library, and surplus space will be released (/FILE ..,SPACE=-9999). The temporary file will then be erased.

par [:x:] [,smspar] | vsn/device | PAD=nn | NR | DF[O] | SPACE=(xxxx,yyy)

:x: The reorganised library and the temporary file will be created on the specified Public Volume Set.

smspar If the library to be reorganised, or the temporary file necessary for a reorganisation is to be created on an SM pubset (System Managed pubset), then this parameter, in conjunction in with the defaults set by the system administrator, can be used to determine the location (Volume set) of the file.

AVAILABILITY=HIGH

The file should be created within an SM pubset on a Volume set designated as high availability (e.g. a DRV mirrored volume).

STORAGE-CL=class

Name of a Storage class created by the system administrator. A Storage class determines the Volume set for a file, and hence the storage attributes such as Performance Attribute, Availability etc.

VOLUME-SET=vset

Determines the Volume set, on which the file should be located within the SM pubset. The system administrator can specify a Volume set explicitly, either with *CONTROL or a one to four character Cat-Id vset (without the ':').

The non-privileged user can only specify a Volume set if the system administrator has granted physical allocation rights.

WORK-FILE=YES|NO

Specifies whether the file is a Work file, and hence whether it may be deleted by the system administrator after a specified time. Work files are located on a Volume set which has been designated as WORK by the system administrator.

vsn/device The reorganised library and the temporary file will be created on the specified private device.

Note:

The following procedure should be followed if the temporary file is to reside on multiple private volumes, or if it should be created on any other special storage medium:

Create a file of a sufficient size on the required volume, using any name (with the exception of CFS.REORGFILE). Make this file known to CFS with the following command: /FILE file,LINK=CFSREORG. From now on, any reorganisation will be executed using this file as the work file. This work file will not be deleted following the reorganisation, as is usually the case. The contents can be deleted with an /ERASE file,DATA command. The space reservation will remain.

nn optional PAD factor for the reorganised file. This is only valid when reorganising ISAM files. PAD=nn can be entered concurrently with :x: or vsn/device (separated by a comma).

NR No Release of free Space. Allocated space not yet used will not be released after the reorganisation. This space can be used by the file/library at a later date.

Standard: Surplus space is released.

DF[O] Defragment [Only]. Before copying back the reorganised temporary file the disk space occupied by the original file is released with /ERASE ..., SPACE, and the required space requested anew. Normally, this will result in a reduction of the number of extents needed for the file. The defragmentation is particularly efficient if the temporary file is created on a private volume, or on a different pubset (ONXREORG :x:,DF).

DFO: Only the defragmentation is carried out. "Holes" in the library or ISAM file will not be released.

Standard: Defragmentation disabled for libraries and ISAM files, and enabled for all other files.

SPACE= A FILE command will be executed with the specified SPACE parameter following the successful reorganisation. Surplus space can be released, and the secondary allocation modified simultaneously (e.g. SPACE=(-9999,30) ).

Standard: Surplus space is released. The secondary allocation is not modified.

MODE=CFS|LMS

This parameter determines the reorganisation method for PLAM libraries.

MODE=CFS CFS-internal, basic reorganisation. This method consists of moving all elements to a new library. The newly-created temporary library will be copied back to the original library, and then deleted. This method achieves optimal reorganisation results, but takes significantly longer than the LMS method (see below), particularly with large libraries.

MODE=LMS LMS offers its own reorganisation method, as from Version 3.0. This operates in place, that is, without the individual elements being moved. The library will finally be copied back. This method results in the reorganisation being achieved in the shortest possible time. Under certain conditions, it can result in fewer pages being released than by the CFS method. MODE=LMS will be ignored if the PLAM library is being reorganised by being renamed to a second library.

Standard: MODE=CFS.

The default method can also be changed to MODE=LMS in CFSMAIN.

Notes:

ONXREORG... will also reorganise any ISAM files. All records will be copied to a temporary file.

The 'str1'='str2' variant has the additional advantage over the simple variant (where the original is overwritten) of using minimal file extents when the new file is created.

When reorganising PLAM libraries, the Creation Date of all elements is set to the current date (AGE=0). The User Date for each element is not amended. Refer also to the UDAT command. This command will cause the AGE to be calculated on the basis of the User Date, and not from the Creation Date, which cannot be varied. A full description of the UDAT command can be found on page 18-.

Examples:

ONXREORG ' '='.REO'

The libraries marked with X will be reorganised into new libraries, whose names will be suffixed with '.REO' .

e.g. CFS.S.LMSLIB --> CFS.S.LMSLIB.REO.

ONXREORG''='REORG.'

The libraries marked with X will be reorganised to new libraries whose names will be prefixed with 'REORG.' .

e.g. CFS.S.LMSLIB --> REORG.CFS.S.LMSLIB.

ONXREORG PVT001/D3475

The flagged libraries will be reorganised. The necessary temporary files will be created on the private volume PVT001. The temporary file will overwrite the original file following a successful reorganisation.

Restore Files from Archive to Disk

ONXRESTORE ['str1'=...,] [STATE] [,TO=PUBLIC|vsn|(vsn, ...)] [,DEVICE=dev] [,ENV-ATT= FROM-TARGET|FROM-ORIGIN] [,CONV=NO|STD|CONV] [,REP=YES|NO|ALL| ALLP] [,SPACE=REORG|KEEP] [,PASSWORD= ...] [,DIR=NONE] [_PARAM_....]

The ONXRESTORE Variable Action can only be processed in conjunction with an Archive directory list created by DIR directory. RESTORE allows files or Job variables that were saved with the SAVE or DSAVE Archive statements to be restored to the system under the same or to different names.

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

STATE Corresponds to the Archive operand FROM=...,STATE in the RESTORE/DRESTORE statement.

The STATE parameter is only valid for partial save entries (PART type). It results in the last full save of the file being restored, and then the modified pages from the partial saves.

TO=PUBLIC|vsn|(vsn,...)

Corresponds to the Archive operand TO=... in the FILES statement.

The TO= parameter will result in the restoral of the files to the specified private volume, or to public space.

Standard: If the TO= operand is not specified, the files will be restored to the original private volumes from which they were saved, or back to public.

DEVICE=device

Only used in conjunction with the TO=vsn (see above), this parameter identifies the device type for the specified private volume.

ENV-ATT=FROM-TARGET|FROM-ORIGIN

Corresponds to the ENVIRONMENT-ATTRIBUTES operands in the [D]RESTORE statement.

This parameter controls how the RESTORE of files which already exist and which are protected with ACL, BACL or GUARDS, will be performed.

CONV=NO|STD|CONV

Corresponds to the CONVERSION operands in the [D]RESTORE statement.

This parameter will control how files which had had a PAM key before the save operation will be converted, if the target volume of the restore operation is an NK volume.

REP=YES|NO|ALL|ALLP

Corresponds to the Archive operand REPLACE=... in the [D]RESTORE statement.

This parameter determines whether existing files of the same name will be overwritten or not. For further information, see the ARCHIVE User Manual, RESTORE statement.

SPACE=REORG|KEEP

Corresponds to the Archive operand SPACE=... in the [D]RESTORE statement.

This parameter determines whether the existing file will be deleted prior to it being replaced or not. For further information, see the Archive User Manual, RESTORE statement.

PASSWORD=passw|(passw,...)

Corresponds to the Archive operand PASSWORD=... in the [D]RESTORE statement.

This parameter allows any necessary read passwords for the saved files to be entered. The system administrator does not need to specify passwords. For further information, see the Archive User Manual, RESTORE statement.

DIR=NONE This parameter will result in a directory file not being required when ARCHIVE performs a restore. This means that the DO procedure will contain the VSN's of the tapes required to restore the files, as well as the correct device types, in the ARCHIVE Restore statement. A TYPE message will be issued to CONSOLE to inform the operator when to mount the relevant tapes.

An example of the application of the DIR=NONE parameter is if the ARCHIVE Restore procedure for certain files is created on one host, then transferred to another host by file transfer and executed there. The files can then be restored without reference to the original directory file. The sole prerequisite is access to the correct Archive tapes.

PARAM ... Corresponds to the PARAM Archive statement in a RESTORE process.

General Archive settings can be set here, such as,

OPERATOR=YES|NO,RESTART=YES|NO,WRCHK=YES|NO,SNR=YES|NO,STREAM=YES|NO . For further information, see the ARCHIVE User Manual, PARAM statement.

The CATID=YES|NO operand may not be set in the PARAM statement, since CFS sets it automatically depending on the value already set in the Archive directory.

The PARAM statement must be specified last, and must be separated by a blank from the preceding parameters.

Note:

ONXRESTORE can only be used to restore files or Job variables from a CFS Archive directory list that was saved with the Archive statements SAVE or DSAVE. Files that were saved with EXPORT must be restored with the ONXIMPORT Variable Action (See page 5-).

Select: Elements from a Library to Files

ONXSEL ['str1'=....] [, vsn/device]

Create a file from an FMS / LMS / PLAM library element.

'str1'='str2' The name of the file to be created is constructed such that a search is made in the name of the element for 'str1', and if found, will be replaced by 'str2'. By definition, every name is suffixed with a blank string '_', and prefixed with an empty string ''

For more information on Name transformation rules see page 5-.

If the name does not contain 'str1', the SEL Variable Action will not be executed for this element.

If 'str1'='str2' is not specified, the file will have the same name as the element. See also page 6-: Action-Code S (Select).

vsn/device Volume and device type of a private volume on which the file should be created.

Notes:

When selecting PLAM elements to a file, only type 01 records will be processed. All other record type will be ignored.

When selecting PLAM elements to files, neither the element type nor the version description will be used to build the file name. Prefixing a file name is achieved by ONXSEL''='prefix'

Examples:

ONXSEL''='ABC.S.'

e.g. TEST --> ABC.S.TEST

ONXSEL  or  ONXSEL''=''

File name = Element name. Equivalent to the Action Code S.

Modify File Attributes (CCS / Cache / SMS)

ONXSET CCS=[name | *NONE]

The specified Coded Character Set will be assigned for the files or PLAM library elements.

*NONE: The link to a Coded Character Set will be deleted.

ONXSET param=val

One of the Caching (Hiperfile) or SMS (System Managed Storage) file attributes will be set or modified. Only one keyword and its respective value can be specified at a time.

ADMINFO='info' | NO

'info' For each file the system administrator can store a one to eight byte info string for Administration Information purposes in the system catalog (from OSD V3.0).

NO No Administration Information will be stored for the file. Existing information will be deleted.

AVAIL=HIGH | STD

HIGH High Availability. The file will be designated as High Availability, meaning that BS2000 will automatically store the file on media such as mirrored volumes. If no such volume exists, the operation will be aborted with an error message.

STD No particular action will be taken regarding the availability of the data.

DELDATE=dd.mm.yyyy | nnn | NONE

dd.mm.yyyy Deletion date for the file. The file may be deleted as from this date, without reference to the protection attributes set by the owner (as from OSD V3.0).

nnn one to digit value representing the number of days from the current date after which the file may be deleted.

NONE No deletion date is set. Any file protection attributes set by the owner will be taken into account.

DISKWR=IMMEDIATE | BY-CLOSE

IMMEDIATE The file may not be processed in conjunction with a write cache, i.e. the file data must be rendered consistent immediately following every write operation.

BY-CLOSE The file data only needs to be made consistent following the file close operation.

IOPERF=HIGH | VERY-HIGH | STD | USER-MAXIMUM

HIGH The file should be processed in conjunction with a cache (High Performance priority)

VERY-HIGH The file should be processed in conjunction with a cache. If possible, the entire file should be held permanently in the cache.

STD The file possesses no particular Performance attribute, and will not be processed in conjunction with a cache.

USER-MAX The file will be assigned the highest possible Performance attribute allowed by the entry for the user in the Join file.

IOUSAGE=READ-WRITE | READ | WRITE

READ-WRITE A raised Performance attribute is required for read and write operations.

READ A raised Performance attribute is only required for read operations on the file.

WRITE A raised Performance attribute is only required for write operations on the file.

MANCLASS=class | NONE

class Specifies an HSMS-defined Management Class via which the file security, archiving and migration can be controlled. Specifying a Management Class for files on SM pubsets is possible from OSD V3.0.

NONE An existing Management Class definition is reset. Data security is controlled by the standard values or by the characteristics defined with an MA/MI Action Code.

S0MIGR=ALLOWED | FORBIDDEN

ALLOWED The file can be stored within the S0 level to another Volume set on the same SM pubset. The storage can be achieved implicitly through HSMS or implicitly through BS2000. This is possible from OSD V3.0.

FORBIDDEN The file may not be stored within an SM pubset. This is restricted to the system administrator.

STOCLASS=class | STD | NONE | UPDATE

class The file on the SM pubset will be allocated to the specified Storage class. The names and characteristics of the Storage classes are defined by the system administrator and can be queried by the /SHOW-STORAGE-CLASS BS2000 command. Storage classes allow simple rules to be defined for the storage locations for files within an SM pubset. Allocating a Storage class to a file enables it to be migrated implicitly from one Volume set to another within an SM pubset.

Allocating a Storage class is possible from OSD V3.0.

STD The default Storage class associated with the SM pubset user entry will be allocated. If no default Storage class has been defined then the file will have the same attributes as for STOCLASS=NONE.

NONE The file will not be allocated a Storage class. The storage location for the file will be determined by the following characteristics (see the respective parameters of the MODIFY-FILE-ATTR command): WORK-FILE, VOLUME-SET, VOLUME, DEVICE-TYPE, IO-ATTRIBUTES, FILE-PREFORMAT, DISK-WRITE, AVAILABILITY.

UPDATE If the file has already been assigned a Storage class, the current value will be read from the Storage class catalog and applied to the file. This option is relevant if the attributes have been amended since the last time it was referenced by the file.

USERINFO='info' | NO

'info' The user can associate a one to eight byte information element info with the file (from OSD V3.0).

NO No user information will be associated with the file. An existing entry will be deleted.

WORK=YES | NO | STD

YES The file on the SM pubset will be cataloged as a work file in the system catalog, and hence can be deleted at some later point by the system (from OSD V3.0).

NO The file is not cataloged as a work file.

STD The file will only be cataloged as a work file if it is already stored on a Volume set designated for work files.

Amend User Date for PLAM Library Elements

ONXSETUDAT [ dd. [mm.yyyy] ]

The User Date field of all PLAM elements marked with X will be set to the specified date. The month and year may be omitted - the current values will then be substituted.

If the entire dd.mm.yyyy specification is omitted, the User Date and User Time values for the elements will be set to the current date and time.

Sort Files / Library Elements singly or multiply

ONXSORT ['str1'=...] [SF=fld] [, OUT=file] [, ?]

ONXSORT ['str1'=...] [?] [%name] [, OUT=file]

This Variable Action will call the BS2000 SORT program. The marked files / library elements can be sorted singly or merged to one output file.

'str1'='str2' Name transformation rules. The files / library elements marked with X will be sorted singly. The name of the file to be created by the sort program is constructed such that a search is made in the input file name for 'str1', and if found, will be replaced by 'str2'. By definition, every name is suffixed with a blank string '_', and prefixed with an empty string '' . If the input file name does not contain 'str1', it will not be sorted.

If 'str1'='str2' is not specified, then, depending on the OUT= parameter, the file will be sorted to itself (OUT=*SAME), or to a single output file (OUT=file).

SF= Sort Fields.

(field-1) [, (field-2)] .... or

((field-1) ,(field-2) .... ,(field-n)) [,FORMAT=format] [,SIZE=n] [,OPT=...] ...

Specification of the sort fields, their format, and any additional options according to the syntax of the SORT statement in the SORT program. For a full description, see the SORT (BS2000) Reference Manual. Typical statements are:

(5,10),(20,2,D)

((5,10,A),(20,2,D)),FORMAT=BI,OPT=SEL

When specifying the sort fields, the first parameter (the position of the sort field in the record) must always be given as for a file with RECFORM=V, independent of the actual RECFORM type. Therefore, the first position of a record in a RECFORM F file must be 5.

OUT= file Name of the sorted output file. If multiple input files were marked, file will contain the sorted result of all of the input files. If file does not exist, it will be created with FCBTYPE=SAM, RECFORM=V, BLKSIZE=(STD,16) attributes.

lib(element) Name of the output library and element into which the sorted output should be stored.

*SAME Individual file/library element sort. The original file will be overwritten with the sort result. 'str1'='str2' may not be specified.

lib([t/]*SAME) Individual file/library element sort. The sorted data objects will be saved under the same name as an element of type t in the specified PLAM library. Standard type for t: D

The name of the output file can also be assigned when starting CFS as follows: /FILE file,LINK=SORTOUT,FCBTYPE=..

If the name transformation rule 'str1'='str2' is specified, the OUT= parameter is ignored.

? The sort mask will be displayed. A number of options, parameters and exits for controlling the sort process can be entered.

%name The name of a parameter set to which all the parameters entered earlier in a sort mask were saved. The sort parameters will be saved by means of a SP %name command entered from the command field (see below).

?,%name As above. The parameters saved to the %name parameter set will be displayed on screen, and may be modified.

Notes:

Pamkeys and address lists cannot be sorted with this Variable Action.

With input files having Recform=V, care must be taken that the sort fields are within the record boundaries of all input files.

Records from Recform-F input files will be converted to Recform-V format before being passed to the SORT program.

If the OUT= parameter is specified, and if the SF= parameter is omitted, CFS will not display the sort mask. In this case, the SORT statements will be requested from the SORT program itself with RDATA. All statements may be entered, as described in the SORT manual. An END statement should be entered as the last statement.

Sort Parameter Mask Format:


With a mouseclick you get a describtion of the screen item.

Description of the input fields of the Sort Parameter mask:

COMMAND : HC [file] set Hardcopy mode

NHC reset Hardcopy mode

/cmd any BS2000 command

SP %name the values entered in the mask will be saved as a parameter set with the specified name.

LP %name the parameter set saved previously with an SP command will be restored to the current mask. This command is equivalent to the Variable Action ONXSORT ?,%name.

? invoke the help system.

F3 capture the current mask to the CFS hardcopy file.

K1 abort the ONXSORT Variable Action.

Shift ENTER invoke the command memory.

Sort-Fields : Identical format to the keyword parameter SF=

Output-File : Identical format to the keyword parameter OUT=

Fcbtype, Blksize, Recsize, Keypos, Keylen, Blkctrl : Characteristics of the sorted output file.

Recsize = 0 implies Recform=V.

Recsize > 0 implies Recform=F.

When sorting single files (ONXSORT'str1'='str2'), the sorted files will have the same characteristics as the input files, if the predefined standard values for Fcbtype, Blksize, Recsize, Keypos, Keylen, Blkctrl are not modified.

Fill-Character : If a value > 0 is specified for Recsize, then output records shorter than this value will be padded with this character to the required length after the sort.

Truncate : Y If a value > 0 is specified for Recsize, output records longer than this will be truncated after the sort.

N If a value > 0 is specified for Recsize, and records appear in the output file with records longer than this value, SORT will be aborted with a DVS error.

SUM-Fields : Definition of SUM fields. The format is identical to that in the Sort-Fields or in the SF= keyword parameter. For further information about sum fields, see the SORT (BS2000) Reference Manual, SUM sort statement.

MODS-Library : Name of the LMR/PLAM library containing required Sort Exits (see below). The name of the MODS library can also be specified before starting CFS with a file command as follows: /FILE file, LINK=SORTMODS.

SORT-Exit E03, ..., EXT : User exits which will call the specified module from the MODS library. Specifying a module name for a sort exit xx corresponds to a sort statement MODS Exx=(LINK=name). For further information, see the SORT (BS2000) Reference Manual, sort statement MODS.

When programming this type of module, care should be taken only to pass Recform-V format records.

Modify extended params : Y A second mask is displayed, in which the parameters for the INCLUDE, OMIT and NEWCOL statements may be entered.

Mask Format for the Extended Parameters:


With a mouseclick you get a describtion of the screen item.

Description of the input fields of the extended sort parameter mask:

COMMAND : HC [file] set Hardcopy mode

NHC reset Hardcopy modue

/cmd any BS2000 command

SP %name the values entered in this and in the main mask will be saved as a parameter set under the specified name.

? invoke the help system.

F3 capture the current mask to the CFS hardcopy file.

K1 abort the ONXSORT Variable Action.

Shift ENTER invoke the command memory.

Include : Definition of the parameters for an INCLUDE statement in the SORT. For further information on the Include statement, see the SORT (BS2000) Reference Manual, INCLUDE sort statement. An example is:

(7,4,BI,EQ,11,4,BI)

(7,4,BI)=C'&&&&'

Omit : Definition of the parameters for an OMIT statement in the SORT. For further information on the Omit statement, see the SORT (BS2000) Reference Manual, OMIT sort statement. An example is:

(7,4,BI,EQ,11,4,BI)

(7,4,BI)=C'&&&&'

Newcol : Definition of the parameters for a NEWCOL statement in the SORT. For further information on the Newcol statement, see the SORT (BS2000) Reference Manual, NEWCOL sort statement. An example is:

(Aa,aÄ,Ää)

(Aa,aÄ,Ää),(00F8,F800)

Examples:

ONXSORT SF=(5,8),(20,3,D),OUT=CFS.SORTFILE

The records of all files marked with X will be sorted and merged to the sequential output file CFS.SORTFILE. Records from Recform=F input files will be converted to V-format before the sort. The primary sort field begins in column 5 (i.e. straight after the 4 byte record length field), is 8 bytes long, and is ascending. The second sort field begins in column 20, is 3 bytes long, and is descending.

ONXSORT' '='.SORT' %SORT1

All the files marked with X will be sorted as single files. The names of the sorted files will be the same as the input files, but suffixed with '.SORT'. The sort parameters, the output file attributes, and all other options for controlling the sort run (sum fields, sort exits, etc.) will be taken from the parameter set %SORT1.

Compress/Decompress Files with XPRESS

ONXXPRC [ 'str1'=...] [, MSG|NOMSG] [, INST=$userid.]

ONXXPRD [ 'str1'=...] [, MSG|NOMSG] [, INST=$userid.]

The files marked with the Action Code X will be compressed (XPRC), or decompressed (XPRD) with the XPRESS program.

To use this Variable Action, the XPRESS software product must be available.

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

MSG | NOMSG The messages created by XPRESS during the compression will, or will not be displayed on screen. Standard: NOMSG

INST=$userid Userid under which the XPRESS software is installed.

Standard: $ST

Store Files in a ZIP Archive

ONXZIP zipfile [, F=C|B] [, M=S|N|TO-E|TO-A] [, C=D|BEST-S|BEST-C]

The files marked with the Action Code X will be compresed and stored in the specified ZIP archive under the same name.

zipfile Name of the ZIP archive. This must have been created previously.

It is currently not possible to store the same file more than once in a ZIP archive.

F= Format in which the file should be stored in the ZIP archive.

C (Compatible)

The BS2000 file so created can be transferred to another operating system (by means of FTP in binary mode) and thence accurately processed.

B (BS2000-Modus)

The BS2000 file so created can only be accurately processed by other BS2000 systems.

M= Coding system under which the file should be stored in the ZIP archive.

S (Standard)

The input file will be stored using the existing format of the ZIP archive. See Parameter F=

N (None)

The BS2000 files (SAM/ISAM/PAM) will not be subjected to any code transformation when stored in the ZIP archive.

TO-A (To ASCII)

Existing EBCDIC BS2000 files (SAM/ISAM) will be converted to ASCII when stored in the ZIP archive.

TO-E (To EBCDIC)

Existing ASCII files (SAM/ISAM) will be converted to EBCDIC when stored in the ZIP archive.

C= Compression method, with which the file should be stored in the ZIP archive.

D (Default)

This method is a compromise between processing speed and compression rate.

BEST-C (Best Compression)

Best compression rate, but at a cost of higher CPU utilisation.

BEST-S (Best Speed)

Lowest CPU utilisation.

Notes:

Only files, not library elements can be stored in a ZIP archive by means of the Variable Action ONX ZIP. The ZIP archive will be created if it does not exist.

Instead of ONX ZIP, files and library elements can be stored in a ZIP archive by means of the

ONX ADD zipfile command.

If the file zipfile does not exist, the user will be asked whether a new library or a new ZIP archive should be created.

Using ONXADD, the file or library elements will be added to the ZIP archive with the standard settings described above.

Example:

ONXZIP TMP.ZIPFILE,M=BEST-C

Extract Files from a ZIP Archive

ONXUNZIP ['str1'=...]

The files marked with the Action Code X will be extracted from the archive to disk.

'str1'='str2' Optional name transformation rules

Note:

Zipped files can also be extracted with

ONXSEL ['str1'=...] instead of ONX UNZIP.

Example:

ONXUNZIP ''='#'

The files marked with X will be extracted from the archive and stored as temporary files on disk (by prefixing each filename with '#' ).