The CONVERT statement converts ISP commands stored in files or library elements into SDF commands.
CONVERT |
FROM-FILE = <filename 1..54> / *LIBRARY-ELEMENT(...) *LIBRARY-ELEMENT(...) LIBRARY = <filename 1..54 without-gen-vers> ,ELEMENT = *ALL(...) / <composed-name 1..64>(...) / <filename 1..64 without-cat-gen-vers with-wild>(...) *ALL(...) VERSION = *HIGHEST-EXISTING / *ALL / <composed-name 1..24> / <filename 1..24 without-cat-gen-vers with-wild> <composed-name>(...) VERSION = *HIGHEST-EXISTING / *ALL / <composed-name 1..24> / <filename 1..24 without-cat-gen-vers with-wild> <filename>(...) VERSION = *HIGHEST-EXISTING / *ALL / <composed-name 1..24> / <filename 1..24 without-cat-gen-vers with-wild> ,TYPE = J / <alphanum-name 1..8> ,EXPECT-CONTINUATION = *STD / *NEW-MODE / *OLD-MODE ,PARAMETER-LINES = *CONVERT / *COPY-ONLY ,TO-FILE = *STD / <filename 1..54> / *LIBRARY-ELEMENT(...) *LIBRARY-ELEMENT(...) LIBRARY = <filename 1..54 without-gen-vers> ,ELEMENT = *SAME(...) / <composed-name 1..64>(...) *SAME(...) VERSION = *HIGHEST-EXISTING / *SAME / <composed-name 1..24> <composed-name>(...) VERSION = *HIGHEST-EXISTING / *SAME / <composed-name 1..24> ,TYPE = *SAME / <alphanum-name 1..8> ,PRODUCE-CONTINUATION = *STD / *NEW-MODE / *OLD-MODE ,REPLACE-OLD-FILE = *YES / *NO ,SYSTEM-SYNTAX-FILE = $.SYSSDF.SDF-CONV.210.USER.U-CMD / <filename 1..54> ,GROUP-SYNTAX-FILE = $.SYSSDF.SDF-CONV.210.USER.S-CMD / <filename 1..54> / *NO ,UNCHANGED-CMD = *NONE / list-poss(30): <structured-name 1..30> ,DOCUMENTATION = *NO / *MINIMUM / *MAXIMUM ,TARGET-VERSION = *CURRENT / *V10 / *V11 / *OSD-V1 / *OSD-V2 ,OUTPUT-FORM = *STD / *ACCEPTED-FORM / *INVARIANT-FORM(...) *INVARIANT-FORM(...) CONTEXT = *ALL / list-poss(3): *BATCH / *BATCH-PROC / *DIALOG-PROC ,PROCEDURE-FORMAT = *SAME (...) / *S-PROCEDURE(...) *SAME(...) BLOCK-INPUT = *NOT-ALLOWED / *ALLOWED *S-PROCEDURE(...) CMD-FORMAT = *SDF / *SAME ,PROGRAM-INPUT = *DATA(...) / *STMT(...) *DATA(...) EXCEPT-AFTER-CMD = *NONE / list-poss(30): <text 0..30> ,WARNING = *NO / *YES *STMT(...) EXCEPT-AFTER-CMD = *NONE / list-poss(30): <text 0..30> ,BLOCK-INPUT = *NOT-ALLOWED / *ALLOWED |
FROM-FILE =
Name(s) of the SAM or ISAM file or of the element(s) from a PLAM or OSM library (input procedure) which are to be converted.
The files/library elements may be located on NK4 disks.
FROM-FILE = <filename 1..54>
Name of the SAM or ISAM file to be converted.
FROM-FILE = *LIBRARY-ELEMENT(...)
Name of the library and its element(s).
Elements of an OMS library must be of type S.
LIBRARY =<filename 1..54 without-gen-vers>
Name of the library containing the element or elements to be converted.
ELEMENT =
Specifies the name(s) of the library element or elements.
ELEMENT = *ALL(...)
All elements of the specified library are to be converted. This operand value can only be specified for elements of a PLAM library.
VERSION =
Specifies the element version.
VERSION = *HIGHEST-EXISTING
The highest existing version is used by default.
VERSION = *ALL
All versions of all elements are converted. This operand value can only be specified for elements of a PLAM library.
VERSION = <composed-name 1..24>
Version number of the element.
VERSION = <filename 1..24 without-cat-gen-vers with-wild>
All versions which match the specified string are to be converted. This operand value can only be specified for for elements of a PLAM library.
ELEMENT = <composed-name 1..64>(...)
Name of the library element.
If the library is an OSM library, the names of the elements it contains must not be longer than 8 characters. If more than 8 characters are entered for the element name, only the first 8 are used for selecting the element.
VERSION=
For possible specifications see the operand ELEMENT = *ALL(...).
ELEMENT = <filename 1..64 without-cat-gen-vers with-wild>(...)
All elements in the library which match the specified string are to be converted. This operand value can only be specified for elements in a PLAM library.
VERSION=
For possible specifications see the operand ELEMENT = *ALL(...).
TYPE = J / <alphanum-name 1..8>
Determines the type of the element(s) of the input library.
TYPE=S must always be specified for elements of an OMS library.
EXPECT-CONTINUATION =
Position of the continuation character in the input procedure.
EXPECT-CONTINUATION = *STD
The position of the continuation character corresponds to the current SDF setting.
This setting can be displayed by means of the SHOW-SDF-OPTIONS statement and modified by means of MODIFY-SDF-OPTIONS CONTINUATION=...
EXPECT-CONTINUATION = *NEW-MODE
The position of the continuation character is expected to be behind the last character in the line.
Lines in S procedures containing commands and statements may have any length;
the position of the continuation character is therefore variable.
In non-S procedures, the continuation character must be in a position preceding column 73.
EXPECT-CONTINUATION = *OLD-MODE
The position of the continuation character is expected to be in column 72 exactly.
PARAMETER-LINES =
Determines whether command records which contain procedure parameters or in which job variables are to be replaced are converted.
PARAMETER-LINES = *CONVERT
Command records which contain procedure parameters or in which job variables are to be replaced are converted. If errors occur during conversion, the commands affected are transferred unchanged to the output procedure.
PARAMETER-LINES = *COPY-ONLY
Command records which contain procedure parameters or in which job variables are to be replaced are transferred unchanged to the output procedure. These commands are not provided with comments, regardless of the value set for documentation (DOCUMENTATION operand).
TO-FILE =
Name(s) of the SAM file or the element(s) of a PLAM library to which the conversion result (output procedure) is to be written.
TO-FILE = *STD
If no file name or library element is specified, SDF-CONV automatically creates a SAM output file with the name SYSCVR.tsn.yyyy.mm.dd.hh.mm.ss. This name is made up of the prefix SYSCVR, the task sequence number, and the current date and time, and is therefore unique. The file will not be overwritten by subsequently generated output files (regardless of the setting for the REPLACE-OLD-FILE operand). In guided dialog the generated standard file name is displayed.
TO-FILE = <filename 1..54>
Name of the output file to which the conversion result (output procedure) is to be written.If there is no file with this name in the catalog, a SAM file with this name is created.
Any file with the same name in the catalog must be released for overwriting by means of the operand REPLACE-OLD-FILE=*YES.
TO-FILE = *LIBRARY-ELEMENT(...)
Name of the PLAM library and its element(s).
LIBRARY = <filename 1..54 without-gen-vers>
Name of the PLAM library which contains the element or elements to be converted.
ELEMENT =
Specifies the name(s) of the library element(s).
ELEMENT = *SAME(...)
The name of the library element matches the name of the file or element specified in the FROM-FILE operand.
VERSION =
Specifies the version of the element.
VERSION = *HIGHEST-EXISTING
By default the highest available version is used.
VERSION = *SAME
The version of the output library element matches that of the input library element or, if a SAM or ISAM file is to be converted, of the highest available version.
VERSION = <composed-name 1..24>
Version number of the element.
ELEMENT = <composed-name 1..64>(...)
Name of the library element.
VERSION =
For possible specifications see the operand ELEMENT = *SAME(...).
TYPE = *SAME / <alphanum-name 1..8>/
Determines the type of the element(s) of the output library.
If the name of an SAM or ISAM file is specified for the FROM-FILE operand, the elements of the output library are automatically of type J.
PRODUCE-CONTINUATION =
Position of the continuation character in the output procedure.
If the output procedure is to be an S procedure, a variable format is used. Continuation characters are written as described under PRODUCE-CONTINUATION=*NEW-MODE.
PRODUCE-CONTINUATION = *STD
The position of the continuation character corresponds to the current SDF setting.
This setting can be displayed by means of the SHOW-SDF-OPTIONS statement and modified by means of MODIFY-SDF-OPTIONS CONTINUATION=...
PRODUCE-CONTINUATION = *NEW-MODE
The continuation character is written behind the last character in the line.
PRODUCE-CONTINUATION = *OLD-MODE
The continuation character is written in column 72 exactly.
REPLACE-OLD-FILE = *YES / *NO
Specifies whether an existing output file or a library element may be overwritten (*YES) or not (*NO).
SYSTEM-SYNTAX-FILE =
Name of the (system) syntax file used to convert user commands.
SYSTEM-SYNTAX-FILE = $.SYSSDF-CONV.210.USER.U-CMD
Preset (system) syntax file for converting user commands.
SYSTEM-SYNTAX-FILE = <filename 1..54>
Name of the (system) syntax file to be used to convert user commands.
GROUP-SYNTAX-FILE =
Name of the (group) syntax file used for converting privileged commands.
GROUP-SYNTAX-FILE = $.SYSSDF-CONV.210.USER.S-CMD
Preset (group) syntax file used for converting privileged commands.
GROUP-SYNTAX-FILE = <filename 1..54>
Name of the (group) syntax file to be used for converting privileged commands.
GROUP-SYNTAX-FILE = *NO
The privileged commands are not to be converted. If there is no (group) syntax file for the user, conversion will be aborted unless *NO is specified.
UNCHANGED-CMD =
The conversion of one or more commands can be suppressed. If SDF-CONV encounters such a command, the command record is transferred to the output procedure unchanged. In addition, an error message with the weight NOTE
is written to the conversion log.
You should bear in mind that the only commands that will be recognized as commands that are to be excluded from conversion are those written exactly as specified in the UNCHAN-GED-CMD operand.
Example:
In order to exclude the ERASE command from conversion, all the various forms used (in the input procedure) must be specified. This could be, for example: ERASE, ERAS, ER.
UNCHANGED-CMD = *NONE
No commands are to be excluded from conversion.
UNCHANGED-CMD = list-poss(30): <structured-name 1..30>
The specified commands are excluded from conversion right from the outset.
Up to 30 commands or alternative command forms can be specified.
If the output procedure is to be an S procedure, the PROCEDURE command is converted accordingly even if specified in the UNCHANGED-CMD operand.
DOCUMENTATION =
Successful conversion of the command language causes inline comments in commands from the input procedure to be lost, with the exception of those inline comments written before the command name.
The output procedure identified by TO-FILE can now contain additional information in the form of comment lines. The scope of this information depends not only on the value of the DOCUMENTATION operand but also on the value set for the UNCHANGED-CMD operand (see Table 7 (Output procedure ), "Documentation level", "Output procedure "): no additional comment lines are generated for any commands specified with the UNCHANGED-CMD operand.
Procedure parameters contained in the additionally generated comment lines are not replaced.
DOCUMENTATION = *NO
Command records from the input procedure which have been identified as comment lines are not included in the output procedure.
DOCUMENTATION = *MINIMUM
Command records from the input procedure which contain inline comments or which consist of more than one input line are passed to the output procedure for documentation purposes. These records appear (as comment lines) in front of the lines containing the conversion result. If it was not possible to convert the command record because conversion is context-dependent or runtime-dependent, a conversion proposal is written in the comment line. The comment lines have the following format:
/"*****" REMARK <command record of input procedure or conversion proposal>
This rule does not apply to command records containing any of the following commands: BEGIN-PROCEDURE, PROCEDURE, REMARK (only if in non-S procedures), SET-PROCEDURE-OPTIONS, BEGIN-PARAMETER-DECLARATION, DECLARE-PARA-METER, END-PARAMETER-DECLARATION or their guaranteed abbreviations.
DOCUMENTATION = *MAXIMUM
All command records from the input procedure are also written (as comment lines) in front of the line containing the conversion result. If it was not possible to convert the command record because conversion is context-dependent or runtime-dependent, a conversion proposal is written in the comment line. The comment lines have the following format:
/"*****" REMARK <command record of input procedure or conversion proposal>
This rule does not apply to command records containing any of the following commands: BEGIN-PROCEDURE, PROCEDURE, REMARK (only if in non-S procedures), SET-PROCEDURE-OPTIONS, BEGIN-PARAMETER-DECLARATION, DECLARE-PARA-METER, END-PARAMETER-DECLARATION or their guaranteed abbreviations.
TARGET-VERSION =
Defines which BS2000 version the procedure is to be able to run under.
TARGET-VERSION = *CURRENT
The converted procedure is to be able to run under the BS2000 version which is loaded when conversion is performed.
TARGET-VERSION = *V10 / *V11 / *OSD-V1
The converted procedure is to be able to run under the corresponding Version of BS2000 or BS2000/OSD. In these cases the conversion of the some commands is subject to greater restrictions than are necessary for BS2000/OSD V2 and later versions.
These specifications are supported for compatibiltity reasons only.
TARGET-VERSION = *OSD-V2
The converted procedure is to be able to run in BS2000/OSD-BC as of Version V2.0. This specification is equivalent to TARGET-VERSION = *CURRENT.
OUTPUT-FORM =
Defines the way in which optional operands (i.e. operands with preset values) which are not specified explicitly in the command record are handled.
Regardless of what is specified for OUTPUT-FORM, all specified operands and operand values are converted to the corresponding SDF operands and operand values, provided this is not prevented by prevailing restrictions (e.g. by the UNCHANGED-CMD operand or any of the restrictions listed in section “Restrictions”.
OUTPUT-FORM = *STD
ISP operands and operand values that are not specified are ignored during conversion, i.e. SDF-CONV only converts explicitly specified ISP operands and operand values into the corresponding SDF formats.
When the converted procedure is executed, all operands which have not been specified are set to their default values.
Note
It is possible to modify default values in the syntax files. This may mean that the results of command execution differ.
OUTPUT-FORM = *ACCEPTED-FORM
All specifications of SDF operands and operand values are expanded to their complete names.
OUTPUT-FORM = *INVARIANT-FORM(...)
ISP operands and operand values that are not specified are replaced by the corresponding SDF forms in the course of conversion and assigned their default values.
In this context, users should bear in mind that not all SDF commands with their operands and default values can be executed independently of the task type and the method of execution (called either directly or within a (second) procedure). In such cases, it is vital to specify the environment (task type/execution type) in which the converted procedure is to run, as errors may result in the program being aborted (context-dependency).
CONTEXT =
This operand allows you to specify an environment in which the converted procedure is to run. All SDF operands and default values which are guaranteed to run in the specified environment are generated.
Furthermore, it is possible to specify up to three different environments for which all matching operands and default values are to be replaced. Operands or default values that are not supported by all specified environments are not preset.
CONTEXT = *ALL
The commands are expanded to include the operands and default values guaranteed to run in all possible environments. In this case, that would be the following environments:
in interactive mode
- guided dialog
- unguided dialog
- procedure called from the terminal (DIALOG-PROC)
in batch mode
- in the ENTER file (BATCH)
- in a procedure called by the ENTER file (BATCH-PROC)
CONTEXT = *BATCH
The output procedure is to be able to run in (simple) batch mode.
CONTEXT = *BATCH-PROC
The output procedure is to be able to run in a procedure called in batch mode.
CONTEXT = *DIALOG-PROC
The output procedure is to be able to run in a procedure called from the terminal in interactive mode.
PROCEDURE-FORMAT =
Determines the type of conversion to be applied to the input procedure(s).
PROCEDURE-FORMAT = *SAME(...)
The output procedure is to have the same format as the input procedure.
The commands of input procedures are to be converted into SDF commands.
BLOCK-INPUT =
Determines how the SDF commands generated by SDF-CONV are to be written to the output procedure.
S procedures allow more than one command to be written continuously (as a block) into a single command line, individual command records being separated by semicolon, while in non-S procedures, each command must be written into a separate line since there are no command separators.
BLOCK-INPUT = *NOT-ALLOWED
SDF-CONV writes each command into a separate line in the output procedure.
BLOCK-INPUT = *ALLOWED
If SDF-CONV converts single ISP commands into more than one SDF command, these can be written continuously into a single command line.
Any specification of this operand value is ignored during the conversion of commands from non-S procedures.
Example
| may be converted into may be converted into |
PROCEDURE-FORMAT = *S-PROCEDURE(...)
The input procedure is to be converted into an S procedure. The following options can be specified: conversion of input procedure commands into SDF commands (CMD-FORMAT operand), conversion of data lines into statement lines (PROGRAM-INPUT operand), ddefinition of the output procedure format (BLOCK-INPUT operand).
CMD-FORMAT =
Specifies whether the commands of the input procedure are to be converted into SDF commands or not.
CMD-FORMAT = *SDF
The commands of the input procedure are to be converted into SDF commands as specified with the OUTPUT-FORM operand.
If the input procedure is a non-S procedure and the PROCEDURE command is specified with the UNCHANGED-CMD operand, this specification is ignored.
CMD-FORMAT = *SAME
The commands of the input procedure are to be retained unchanged.
Nevertheless, the representations of procedure parameters are adapted to S procedure conventions.
Example
| is converted into is converted into |
Notes
Job variable expressions are adjusted as follows:
&(jobvariable)
becomes&(JV(’jobvariable’))
In command and statement lines the job variables must begin with the character ’&’. In data lines they must also begin with ’&’, but specifying PROGRAM-
INPUT=*STMT means that they are not interpreted as data but as statements.Procedure parameters are adjusted as follows:
&(procpar)
becomes&(procpar)
The procedure parameters must comply with the following formation rules:They must be declared in the procedure header ([BEGIN-]PROC line).
In command and statement lines they must begin with the character ’&’, and in data lines with the character specified for SUBDTA=.
The parameter name may be no more than 20 characters long (exception: positional parameters, which are automatically truncated by SDF-CONV).
PROGRAM-INPUT =
Determines whether data lines are to be converted into SDF statement lines during conversion of a non-S procedure into an S procedure.
In non-S procedures, statement lines can have the same format as data lines, i.e. they can be entered without leading slashes, while in S procedures, statement lines must always start with two slashes.
In any case, the representations of procedure parameters are adapted to S procedure conventions (see example under CMD-FORMAT=*SAME).
PROGRAM-INPUT = *DATA(...)
Lines without leading slashes in the input procedure are written to the output procedure unchanged i.e. as data lines.
EXCEPT-AFTER-CMD =
Determines whether individual data lines are to be excepted from the general handling of data lines.
EXCEPT-AFTER-CMD = *NONE
All data lines are to be transferred to the output procedure unchanged.
EXCEPT-AFTER-CMD = list-poss(30): <text 1..30>
Permits exceptional conversion of individual data lines into SDF statement lines.Any data line following a command line containing at least one of the elements listed will then be converted into an SDF statement line; this exceptional handling will be continued until the next command line containing none of the elements listed.
WARNING = *NO / *YES
Determines whether a WARNING
message is to be issued (*YES) or not (*NO) each time SDF-CONV detects a data line during conversion.
PROGRAM-INPUT = *STMT(...)
Lines without leading slashes in the input procedure are converted into SDF statement lines by prefixing two slashes to each of these lines.
EXCEPT-AFTER-CMD =
Determines whether individual data lines are to be excepted from the general handling of data lines.
EXCEPT-AFTER-CMD = *NONE
All data lines are to be converted into SDF statement lines.
EXCEPT-AFTER-CMD = list-poss(30): <text 1..30>
Permits individual data lines to be excepted from conversion into SDF statement lines i.e. are to be written to the output procedure unchanged.
Any data line following a command line containing at least one of the elements listed will then be transferred unchanged; this exceptional handling will be continued until the next command line containing none of the elements listed.
BLOCK-INPUT =
Determines how the SDF commands generated by SDF-CONV are to be written to the output procedure.
S procedures allow more than one command to be written continuously (as a block) into
a single command line, individual command records being separated by semicolon, while in non-S procedures, each command must be written into a separate line since there are no command separators.
BLOCK-INPUT = *NOT-ALLOWED
SDF-CONV writes each command into a separate line in the output procedure.
BLOCK-INPUT = *ALLOWED
If SDF-CONV converts single ISP commands into more than one SDF command, these can be written continuously into a single command line.
Any specification of this operand value is ignored during the conversion of commands from non-S procedures.
For an example see PROCEDUE-FORMAT=*SAME(BLOCK-INPUT=*ALLOWED).