-------------------------------------------------------------------------------- MODULE IRENUMBER
-------------------------------------------------------------------------------- REPLACES DAMP module IFSN
--------------------------------------------------------------------------------
IRENUMBER reallocates Feature Serial Numbers (FSNs) in monotonically increasing order. IRENUMBER does not reallocate Internal Sequence Numbers (ISNs). By default IRENUMBER creates a new output file but the /IN_SITU qualifier is available to modify an IFF file in-situ. IRENUMBER is intended mainly for recovery from error situations which have resulted in multiply allocated FSNs within an IFF file.
$ IRENUMBER input-file-spec [output-file-spec] Command qualifiers Defaults /BASE=integer /BASE=1 /INCREMENT=integer /INCREMENT=1 /IN_SITU Create a new output file. /[NO]LOG /NOLOG /LOWER_LIMIT=integer /LOWER_LIMIT=1 /UPPER_LIMIT=integer /UPPER_LIMIT=65535
_Input-File: input-file-spec
If /IN_SITU is not specified, then _Output-File: output-file-spec
--------------------------------------------------------------------------------
input-file-spec
- specifies the IFF file which is to be recoded. Any part of the file specification which is not supplied will be taken from the default specification 'LSL$IF:IFF.IFF'.
[output-file-spec]
- specifies the IFF file which is to be created. By default, IRENUMBER creates an output IFF file to contain the altered data. Alternatively, changes to the input file may be made in-situ by specifying the /IN_SITU qualifier. No output file specification should be supplied on an IRENUMBER command line containing the /IN_SITU qualifier.
Any part of the output file specification 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.
--------------------------------------------------------------------------------
/BASE=integer
- sets the base for the new number allocation. The integer argument to /BASE must lie in the range 1 to 65535. The default base is 1.
/INCREMENT=integer
- sets the increment for the new number allocation. The increment must be a positive, non-zero integer. The default increment is 1.
/IN_SITU
- the default mode of IRENUMBER 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 FSNs. Qualifiers on the command line preceding /IN_SITU are ignored by the command line interpreter (CLI) and a warning message given.
/LOG
- 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 output each time a new IFF layer is encountered in the IFF file. The new and old FSNs are listed as they are changed. On large files the output produced can be voluminous.
/LOWER_LIMIT=integer
- sets the lower limit below which feature numbers in the input file will not be modified. The integer argument to /LOWER_LIMIT must be in the range 1 to 65535. The default lower limit is 1.
/UPPER_LIMIT=integer
- sets the upper limit above which feature numbers in the output file will not be modified. The integer argument to /UPPER_LIMIT must be in the range 1 to 65535. The default upper limit is 65535.
--------------------------------------------------------------------------------
IRENUMBER reallocates IFF Feature Serial Numbers (FSNs) in monotonically increasing order. IRENUMBER is intended mainly for recovery from error situations which have resulted in multiply allocated FSNs within an IFF file. IRENUMBER does not change the Internal Sequence Number (ISN) of the feature.
By default IRENUMBER will produce a new IFF file as output. An option to work on the input file in-situ is provided with the /IN_SITU qualifier. If /IN_SITU is specified and IRENUMBER is used incorrectly there is no route for the recovery of the original form of the data. Use /IN_SITU with great care.
In the absence of any command qualifiers IRENUMBER will reallocate all FSNs found in the IFF file using a replacement base value of 1. The default increment is 1.
Features having an FSN of 0 will not be renumbered. Such features historically have a special context in IFF files which have TC (Transmitted Comment) entries which lie outside of IFF features.
IRENUMBER may be used to reallocate a subset of the FSNs within the IFF file. Lower and upper FSN values may be specified with the /LOWER_LIMIT and /UPPER_LIMIT qualifiers respectively. If these qualifiers are specified IRENUMBER takes the following action:
The value for /BASE should be chosen with care. If the result of the formula:
BASE + ('number of features' * INCREMENT)
is greater than 65536 IRENUMBER issues a warning message and ignores subsequent features. The output IFF file will be only partly renumbered.
--------------------------------------------------------------------------------
$ IRENUMBER/IN_SITU/LOG/BASE=10 W153.IFF
This example demonstrates the /LOG, /IN_SITU, and /BASE qualifiers. The /IN_SITU qualifier means that the file W153.IFF is modified in-situ rather than a new IFF file being created. As /LOG has been specified after /IN_SITU, information is output about the input file being opened, the parameters that the program is using, each layer as it is encountered, and each FSN as it is renumbered. Finally the total number of features renumbered and the total number ignored are output. The /BASE qualifier has the effect of renumbering the FSN's from 10. As no other qualifiers were given the default INCREMENT, LOWER_LIMIT and UPPER_LIMIT were used by the program.
$ IRENUMBER/LOG NEBRASKA
In this example the user specified LSL$IF:NEBRASKA.IFF as the input file-spec and the /LOG qualifier. As no output file was given on the command line, and the /IN_SITU qualifier was not given IRENUMBER prompts for an output filename. The user then specified LSL$IF:TEST.IFF. However, the input file NEBRASKA.IFF could not be found in LSL$IF: so program execution ends with suitable error messages. Either the filename has been mis-typed or the logical name LSL$IF set to an inappropriate device and directory.
Had the input file been found the program would have created LSL$IF:TEST.IFF as ouput.
$ IRENUMBER TEST1/LOWER_LIMIT=10/INCREMENT=2
In this example the user specified LSL$IF:TEST1.IFF as input with a LOWER_LIMIT of 10 and INCREMENT of 2. As no output file was given on the command line, and the /IN_SITU qualifier was not given the program prompts for an ouput filename. The user typed TEST1.REN to specify the output file In the output file features with feature numbers less than 10 would not be modified. Features with feature numbers greater than 10 would have been renumbered in increments of 2 from the default BASE of 1 to an UPPER_LIMIT of 65535.
--------------------------------------------------------------------------------
These messages give information only, and require no immediate action by the user. They are often used to supply explanatory information in support of a warning or error message.
FSNINCBAS, renumbering FSNs in increments of 'integer' from base
'integer' between LOWER_LIMIT 'integer' and UPPER_LIMIT 'integer'
Explanation: The specified increment, base and upper and lower limits are being used.
User action: None.
RENFSN, renumbered FSN 'integer' to 'integer'.
Explanation: The specified FSN 'integer' has been renumbered to the indicated value.
User action: None.
IGNFSN, ignoring FSN 'integer'.
Explanation: FSN 'integer' has been ignored.
User action: None.
LAYER, layer 'integer' found
Explanation: Layer 'integer' has been found in the input file.
User action: None.
These messages are output when an error has occurred that can be corrected immediately by the user or that continued processing will result in a valid IFF output file.
RCHMAXFSN, reached maximum valid FSN number 'integer'
Explanation: The renumbering of features has reached the maximum valid FSN number 65535. No further renumbering will take place.
User action: If a large increment is the cause of this message and unique FSN numbers are required then a smaller increment should be specified. If the default increment has been used then the file is likely to be too large for most IMP utilites and other LSL software.
--------------------------------------------------------------------------------
These messages indicate an error in processing which has caused the program 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.
ERRCLOINP, error closing input file 'file-spec'.
ERRCLOUT, error closing output file 'file-spec'.
Explanation: An error has occured in closing the specified IFF file.
User action: The accompanying messages should help you to interpret the cause of this error. Check that there is sufficient disk space for the file and that the disk is functioning properly. If the problem continues, notify the system manager.
INVBASE, invalid BASE 'integer' specified.
Explanation: An invalid base has been specified either less than 1 or greater than 65535.
User action: Re-run the program with a valid base specified.
INVINCRMT, invalid increment 'integer' specified.
Explanation: An invalid increment has been specified either less than 1 or greater than 65535.
User action: Re-run the program with a valid increment specified.
INVLOWLMT, invalid LOWER_LIMIT 'integer' specified.
Explanation: An invalid lower limit has been specified either less than 1 or greater than 65535.
User action: Re-run the program with a valid lower limit specified.
INVUPLMT, invalid UPPER_LIMIT 'integer' specified.
Explanation: An invalid upper limit has been specified either less than 1 or greater than 65535.
User action: Re-run the program with a valid upper limit specified.
LOWGTRUP, LOWER_LIMIT 'integer' greater than UPPER_LIMIT 'integer'.
Explanation: The specified lower limit is greater than the specified upper limit.
User action: Re-run the program with a lower limit less than the upper limit.
LOWEQUP, LOWER_LIMIT 'integer' equal to UPPER_LIMIT 'integer'.
Explanation: The specified lower limit is equal to the specified upper limit.
User action: Re-run the program with a lower limit less than the upper limit.
UNEXPEOF, Unexpected end of IFF file
Explanation: This message indicates there is something seriously wrong with the IFF file which has caused immediate termination of the program. IRENUMBER has detected the end of the IFF file, but has not detected an IFF 'integer' entry.
User action: Use IMEND on the file, which will correctly position the EOF marker and insert an EJ entry at the end of the file. Re-run IRENUMBER on the corrected file.
In addition to the above messages which are generated by IRENUMBER 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.