-------------------------------------------------------------------------------- MODULE ILAYFC
-------------------------------------------------------------------------------- REPLACES DAMP module LIT
--------------------------------------------------------------------------------
ILAYFC changes all feature codes in one or more layers in an IFF file to specified values.
_Input-file: input-file-spec
If /IN_SITU is not specified:
_Output-file: output-file-spec
input-file-spec
- Specifies the IFF file from which selections are to be made. Any part of the file-spec which is not supplied will be taken from the default specification 'LSL$IF:IFF.IFF;0'.
output-file-spec
- Specifies the IFF file which is to be created. Any part of the file name which is not explicitly given will be taken from the parsed input specification. Note that a version number must not be specified for the output file. If a file with the specified name already exists, a new file will be created with the version number incremented by one.
/CODES=(integer>integer[,...])
- where the first integer of each pair of integers (separated by a '>') is the layer number, the second the feature code which is to replace the feature codes currently in that layer. Failure to specify the /CODES qualifier will result in ILAYFC prompting for input with the prompt:
Layer number, Feature Code ?
This prompt will be repeated for additional arguments until ILAYFC detects a blank line. Processing then begins.
/IN_SITU
/NOIN_SITU
- the default mode of ILAYFC operation is to create a new IFF file to receive the modified data. The /IN_SITU qualifier forces modification to occur in-situ, thus destroying the original data.
/LOG
/NOLOG
- this will result in supplementary messages being sent to SYS$OUTPUT. Supplementary messages are generated when a file is successfully opened, and a reassuring message is output each time a new layer is encountered in the IFF file.
If used on an existing IFF file, ILAYFC allows the user to set all of the feature codes in one or more layers to specified values. In most cases ILAYFC will proceed with badly structured input files, changing only the FS entries of features within the specified layers. Thus any output file created may still contain the structural irregularities of the input file. In such cases the user should invoke other IMP utilities in order to cure the problem.
The Feature Code of a feature is carried in the first word of the FS entry of each feature. ILAYFC only changes the first (feature code) word of the FS entry. As the feature code is stored as a word (16 bit integer) its value must lie in the range -32768 to 32767. In practice negative feature codes are not allowed. The other 3 words of the IFF FS entry remain unaltered. Be very careful to ensure that by changing the feature code, conflicts with information carried in the unchanged words of the FS entry are not introduced. Words 2 to 4 of an IFF FS entry are defined in the IFF User Guide.
$ ILAYFC_Input-file: NOTHERE/LOG _Output file: FAILURE Layer number, Feature code ? 1,23 Layer number, Feature code ? 11,22 Layer number, Feature code ? %LSLLIB-E-IFFOPEN, error opening IFF input file LSL$IF:NOTHERE.IFF %RMS-E-FNF, file not found ELAPSED: 00:00:27.87 CPU: 0:00:00.37 BUFIO: 8 DIRIO: 11 FAULTS: 70 $
$ ILAYFC _Input-file: TEST1/LOG/CODES=(1>A23,55>11)_Output file: : TEST22 %ILAYFC-W-BADPARFMT, incorrect format for /CODES parameters \1>A23\ Layer number, Feature code ? 1,23HEL %ILAYFC-W-TWOARGS, two integer arguments required. Layer number, Feature code ? 1 23 Layer number, Feature code ? 55>11 Layer number, Feature code ? %LSLLIB-I-IFFOPENED, DUA0:[LSL.IFF]TEST1.IFF;3 opened for read %LSLLIB-I-IFFOPENED, DUA0:[LSL.IFF]TEST22.IFF;1 opened for write %ILAYFC-I-LAYERCHA, changing all layer 1 feature codes to 23 %ILAYFC-I-LAYERSKP, skipping layer 12 %ILAYFC-I-LAYERCHA, changing all layer 55 feature codes to 11 ELAPSED: 00:02:22.95 CPU: 0:00:03.31 BUFIO: 13 DIRIO: 18 FAULTS: 110 $
$ ILAYFC _Input-file: MARSH11/LOG
$ ILAYFC TEST/LOG/CODES=(1>1,88>9,55>17,66>66) DUA0:[DILL.FAILED]TESTOUT
$ ILAYFC TEST5/IN_SITU/LOG/CODES=(1>9,11>99)
This example illustrates a successful run using the /IN_SITU option. $STATUS is set to SS$_NORMAL.
--------------------------------------------------------------------------------
These messages give information only, and require no immediate action from the user.
LAYERSKP, skipping layer 'integer'
Explanation: A new layer has been encountered, it is one in which the feature codes are to be unaltered.
User action: None.
LAYERCHA, changing all layer 'integer' feature codes to 'integer'
Explanation: A new layer has been encountered, it is one in which the feature codes are to be altered to the specified value.
User action: None.
ARGSREQ, at least one argument pair required.
Explanation: The user has failed to provide any layer/feature code pairs and has pressed carriage return in response to the prompt:
Layer number, Feature Code?
User action: ILAYFC expects at least one layer/feature code pair to
work with and will persist in reprompting until one is provided. Use
Explanation: A bad character was present in the argument list, remember
the format is:
User action: ILAYFC will re-prompt for input with:
The user should supply the arguments in the form requested, further
arguments can be supplied and the argument list terminated by typing
Explanation: The /CODES parameters have been entered in an incorrect
format (see qualifiers section), the user must enter them all again.
User action: None of the codes supplied with the /CODES qualifier will
be used, instead ILAYFC will prompt for input with:
The user should supply the arguments in the form requested, further
arguments can be supplied and the argument list terminated by typing
Explanation: The user has supplied too many layer numbers. Processing
will proceed for only the specified number of layers.
User Action: Processing of the remaining layers should be completed
with a second run of ILAYFC.
Explanation: Only one integer argument was given when ILAYFC prompted
for input with:
The correct format for response is:
User action: Supply the arguments in the form requested, further
arguments can be supplied and the argument list terminated by typing just
a
--------------------------------------------------------------------------------
Explanation: After the user has failed to enter the layer number and
feature code argument pair in the correct format, in 4 successive attempts, the
program exits.
User action: Read this documentation before trying again.
Explanation: The user has supplied a feature code which is outside the
specified range.
User Action: Specify a feature code that lies within the specified
range.
Explanation: The user has supplied a layer number which is outside the
specified range.
User Action: Specify a layer number that lies within the specified
range.
Explanation: The specified input IFF file terminated before an IFF EJ
entry was encountered.
User action: The valid part of the input IFF file was processed, but
the user should use IPATCH to determine the position of the file truncation
and then use IMEND to correctly terminate the file. Re-run ILAYFC on the
repaired IFF file.
In addition to the above messages which are generated by ILAYFC itself, other
messages may be produced by the command line interpreter (CLI) and by Laser-Scan
libraries. In particular, messages may be generated by the IFF library. These
are introduced by '%IFF' and are documented in the IFF library users' guide.
In most cases IFF errors will be due to a corrupt input file, and this should
be the first area of investigation. If the cause of the error cannot be traced
by the user and Laser-Scan are consulted, then the input file should be
preserved to facilitate diagnosis.
BADCHR, bad character in string - try again
'integer', 'integer'
Layer number, Feature Code?
BADPARFMT, bad format for /CODES parameters - try again
Layer number, Feature Code?
TOOMNYLYRS, only 'integer' layers allowed - continuing
TWOARGS, two integer arguments required.
Layer number, Feature Code?
MESSAGES (ERROR)
These messages indicate an error in processing which has caused ILAYFC to
terminate. The most likely causes are a corrupt or otherwise invalid input IFF
file, or an error related to command line processing and file manipulation.
It is most unlikely that any output file produced will be correctly processed.
--------------------------------------------------------------------------------
ERRSSNVIO, successive syntax violations - please read manual
INVFC, feature code not in range 0 32767
INVLAY, layer number not in range 0 to 32767
UNEXPEOF, unexpected end of IFF file
MESSAGES (OTHER)