Stack files to an ANSI labeled tape.
Stacks files to an ANSI labeled tape. Once the files have been copied to tape, the user may have them deleted, moved to another directory, or left in the original directory.
- INFILE
- Input file. LAS file specification that will match the files to be stacked to an ANSI labeled tape. Wild cards are allowed. INFILE, in conjunction with AFTYPE, defines a set of files called a file group. Only complete file groups will be stacked to a tape. If too many file groups are found that match this specification, only those that will fit on a single tape will be stacked. If a file extension is not supplied, ;IMG is assumed.
- RECSIZ
- Record size. The number of bytes contained in a single record for each file in the file group. One value must be supplied for INFILE and an additional value must be supplied for each file extension in AFTYPE. See User Note 1.
- BLKSIZ
- Block size. The number of records that should be blocked together into a single tape record. One value must be supplied for INFILE and an additional value must be supplied for each file extension in AFTYPE.
- TTYPE
- Tape type. Type of tape that is to be stacked. The default is defined by the TAE global $TTYPE. The list of valid tape types is defined by the TAE global $TTYPEVAL.
- MINBYTES
- Minimum megabytes. The minimum number of megabytes that should be stacked to a tape. If the total size of all the file groups does not exceed this value, ANSISTACK will wait until the combined size of all the available file groups exceeds this value before it will stack them to tape. This value is reset to zero for 8HI, 8LO, and 4MM, type tapes. See User Note 2.
- MAXBYTES
- Maximum megabytes. The maximum number of megabytes that can be written to a tape.
- AFTYPE(--)
- Associated file types. AFTYPE specifies a list of file extensions for each of the associated files that are to be copied to tape along with INFILE.
- DRIVE(--)
- Tape drive. Tape drive to be used for stacking. If a tape drive is specified, it is assumed that an ANSI initialized tape has already been mounted on the tape drive. If NULL, the operator will be prompted to mount a blank, ANSI initialized tape of type TTYPE.
- FILEOPT(--)
- File option. Option for deleting or moving the files that are stacked to tape. If set to MOVE, OUTDIR must be specified. If NULL, the file groups will be left in the input directory.
= DELETE: Delete files after stacking = MOVE: Move files to OUTDIR after stacking
- OUTDIR(--)
- Output directory. If FILEOPT is set to MOVE, OUTDIR must be the directory where the files will be moved after they have been successfully stacked to tape. If FILEOPT is not set to MOVE, this parameter is ignored.
- ERRDIR(--)
- Error directory. Directory where a file group should be placed if an error is encountered while stacking it to tape. If NULL, ERRDIR will be set to the directory specified in INFILE.
- LOGFILE(--)
- Log file. File where all processing messages will be logged with a date and time stamp. An extension of ;LOG is assumed. If NULL, a log file will not be created. Processing messages will always be displayed to the terminal.
- SUMFILE(--)
- Tape summary file. File that should contain a summary of the tape that is created. An extension of ;LIST is assumed. If NULL, the tape summary will not be produced. See User Note 3.
- STOPFILE(--)
- Stop file. The existence of the specified file will signal ANSISTACK to stop stacking file groups to tape and complete gracefully at the next convenient time. If NULL, the default is ANSISTACK;STOP in the directory specified by INFILE. See User Note 4.
- NAME(--)
- Requestor's initials. The initials assigned to the user for the EROS tape archive. If NULL, no initials will be placed on the tape label.
- CODE(--)
- Code for the requestor's group. The code assigned to the requestor's group within the EROS tape archive. If NULL, no code will be placed on the tape label.
- PROJECT(--)
- Project abbreviation. Abbreviation for the requestor's project within the EROS tape archive. If NULL, no project abbreviation will be placed on the tape label.
- DESCRPT(--)
- Description of the tape. Short description of the contents of the tape. The first occurrence of '?' will be replaced with the total number of file groups stacked to the tape. If NULL, DESCRPT will be set to "ANSI TAPE: ? file groups".
- NMONTHS(1)
- Number of months. The number of months from today's date that the tape is to be removed from the tape archive. If a zero is entered, permanent storage is indicated.
- INFILE
- Input file. LAS file specification that will match the AVHRR archive images that are to be stacked to an ANSI labeled tape. Wild cards are allowed. INFILE, in conjunction with AFTYPE, defines a set of files called a file group. Only complete file groups will be stacked to a tape. If too many images are found that match this specification, only those that will fit on a single tape will be stacked. An extension of ;AHDR is assumed.
- TTYPE
- Tape type. Type of tape that is to be stacked. The default is defined by the TAE global $TTYPE. The list of valid tape types is defined by the TAE global $TTYPEVAL.
- MINBYTES
- Minimum megabytes. The minimum number of megabytes that should be stacked to a tape. If the total size of all the file groups does not exceed this value, ANSISTACK will wait until the combined size of all the available file groups exceeds this value before it will stack them to tape. This value is reset to zero for 8HI, 8LO, and 4MM, type tapes. See User Note 2.
- MAXBYTES
- Maximum megabytes. The maximum number of megabytes that can be written to a tape.
- DRIVE(--)
- Tape drive. Tape drive to be used for stacking. If a tape drive is specified, it is assumed that an ANSI initialized tape has already been mounted on the tape drive. If NULL, the operator will be prompted to mount a blank, ANSI initialized tape of type TTYPE.
- FILEOPT(--)
- File option. Option for deleting or moving the files that are stacked to tape. If set to MOVE, OUTDIR must be specified. If NULL, the file groups will be left in the input directory.
= DELETE: Delete files after stacking = MOVE: Move files to OUTDIR after stacking
- OUTDIR(--)
- Output directory. If FILEOPT is set to MOVE, OUTDIR must be the directory where the files will be moved after they have been successfully stacked to tape. If FILEOPT is not set to MOVE, this parameter is ignored.
- ERRDIR(--)
- Error directory. Directory where a file group should be placed if an error is encountered while stacking it to tape. If NULL, ERRDIR will be set to the directory specified in INFILE.
- LOGFILE(--)
- Log file. File where all processing messages will be logged with a date and time stamp. An extension of ;LOG is assumed. If NULL, a log file will not be created. Processing messages will always be displayed to the terminal.
- SUMFILE(--)
- Tape summary file. File that should contain a summary of the tape that is created. An extension of ;LIST is assumed. If NULL, the tape summary will not be produced. See User Note 3.
- STOPFILE(--)
- Stop file. The existence of the specified file will signal ANSISTACK to stop stacking file groups to tape and complete gracefully at the next convenient time. If NULL, the default is ANSISTACK;STOP in the directory specified by INFILE. See User Note 4.
- NAME(--)
- Requestor's initials. The initials assigned to the user for the EROS tape archive. If NULL, no initials will be placed on the tape label.
- CODE(--)
- Code for the requestor's group. The code assigned to the requestor's group within the EROS tape archive. If NULL, no code will be placed on the tape label.
- PROJECT(--)
- Project abbreviation. Abbreviation for the requestor's project within the EROS tape archive. If NULL, no project abbreviation will be placed on the tape label.
- DESCRPT(--)
- Description of the tape. Short description of the contents of the tape. The first occurrence of '?' will be replaced with the total number of file groups stacked to the tape. If NULL, DESCRPT will be set to "ANSI TAPE: ? file groups".
- NMONTHS(1)
- Number of months. The number of months from today's date that the tape is to be removed from the tape archive. If a zero is entered, permanent storage is indicated.
- ACCTNUM(--)
- Account number. The account number to which this order will be sent and billed.
- ORDERNUM(--)
- Order number. The order number that includes this item.
- UNITNUM(--)
- Unit number. The Level-1B unit number of the specified order.
- PRODSUM(NO)
- Product summary. Flag indicating whether to generate a product summary listing for each scene. This listing will be sent to the system printer:
YES : Generate a product summary NO : Don't generate a summary
- OUTFORM(LEVEL0)
- Output format. The format in which to generate the output tape:
LEVEL0 : Level-0 Archive format LEVEL1B : Level-1B format
- INFILE
- Input file. LAS file specification that will match the MSSX archive images that are to be stacked to an ANSI labeled tape. Wild cards are allowed. INFILE, in conjunction with AFTYPE, defines a set of files called a file group. Only complete file groups will be stacked to a tape. If too many images are found that match this specification, only those that will fit on a single tape will be stacked. An extension of ;AHDR is assumed.
- TTYPE
- Tape type. Type of tape that is to be stacked. The default is defined by the TAE global $TTYPE. The list of valid tape types is defined by the TAE global $TTYPEVAL.
- MINBYTES
- Minimum megabytes. The minimum number of megabytes that should be stacked to a tape. If the total size of all the file groups does not exceed this value, ANSISTACK will wait until the combined size of all the available file groups exceeds this value before it will stack them to tape. This value is reset to zero for 8HI, 8LO, and 4MM, type tapes. See User Note 2.
- MAXBYTES
- Maximum megabytes. The maximum number of megabytes that can be written to a tape.
- DRIVE(--)
- Tape drive. Tape drive to be used for stacking. If a tape drive is specified, it is assumed that an ANSI initialized tape has already been mounted on the tape drive. If NULL, the operator will be prompted to mount a blank, ANSI initialized tape of type TTYPE.
- FILEOPT(--)
- File option. Option for deleting or moving the files that are stacked to tape. If set to MOVE, OUTDIR must be specified. If NULL, the file groups will be left in the input directory.
= DELETE: Delete files after stacking = MOVE: Move files to OUTDIR after stacking
- OUTDIR(--)
- Output directory. If FILEOPT is set to MOVE, OUTDIR must be the directory where the files will be moved after they have been successfully stacked to tape. If FILEOPT is not set to MOVE, this parameter is ignored.
- ERRDIR(--)
- Error directory. Directory where a file group should be placed if an error is encountered while stacking it to tape. If NULL, ERRDIR will be set to the directory specified in INFILE.
- LOGFILE(--)
- Log file. File where all processing messages will be logged with a date and time stamp. An extension of ;LOG is assumed. If NULL, a log file will not be created. Processing messages will always be displayed to the terminal.
- SUMFILE(--)
- Tape summary file. File that should contain a summary of the tape that is created. An extension of ;LIST is assumed. If NULL, the tape summary will not be produced. See User Note 3.
- STOPFILE(--)
- Stop file. The existence of the specified file will signal ANSISTACK to stop stacking file groups to tape and complete gracefully at the next convenient time. If NULL, the default is ANSISTACK;STOP in the directory specified by INFILE. See User Note 4.
- NAME(--)
- Requestor's initials. The initials assigned to the user for the EROS tape archive. If NULL, no initials will be placed on the tape label.
- CODE(--)
- Code for the requestor's group. The code assigned to the requestor's group within the EROS tape archive. If NULL, no code will be placed on the tape label.
- PROJECT(--)
- Project abbreviation. Abbreviation for the requestor's project within the EROS tape archive. If NULL, no project abbreviation will be placed on the tape label.
- DESCRPT(--)
- Description of the tape. Short description of the contents of the tape. The first occurrence of '?' will be replaced with the total number of file groups stacked to the tape. If NULL, DESCRPT will be set to "ANSI TAPE: ? file groups".
- NMONTHS(1)
- Number of months. The number of months from today's date that the tape is to be removed from the tape archive. If a zero is entered, permanent storage is indicated.
ANSISTACK will create a temporary directory in [USER], request that the operator mount an ANSI initialized tape, and lock the input directory (see User Note 5). After the directory has been locked, ANSISTACK will select the first file group matching *;IMG, move it into the temporary directory, and unlock the input directory so that other versions of ANSISTACK may continue working in the same directory.
The specified file groups consist of three files with extensions of ;IMG, ;DDR, and ;HIS. Each of these files has a record size of 2048, 512, and 80 bytes respectively. In addition, each of the files will be stacked to tape with a block size of 20480, 512, and 80 bytes respectively.
Because the requested tape type is 8LO, ANSISTACK will only stack one file group at a time to the tape. After each file group is stacked, it will be moved into the [USER.STACKED] directory. The processing messages will be displayed to the terminal, however, they will not be logged in a file since the user has not supplied a file name for LOGFILE. A tape summary file called [USER]SUMMARY;LIST will be created and a tape label will be printed.
If the file [USER]ANSISTACK;STOP appears before the tape is filled, the tape will be dismounted, a tape label will be printed, and the function will complete successfully. If an error is encountered while stacking files to the tape, the offending file group will be moved into the [USER.ERR] directory. It is assumed there were no errors stacking the previous file groups, the tape will be dismounted, a tape label will be printed, and the tape will be considered full.
ANSISTACK will create a temporary directory in [ADAPS.ARCHIVE.SFL.SFL], mount the tape on drive four, and lock the input directory (see User Note 5). After the directory has been locked, ANSISTACK will locate all of the file groups matching A*;AHDR, determine which file groups will fit on the tape, move them into the temporary directory, and unlock the input directory so that other versions of ANSISTACK may continue working in the directory.
ANSISTACK will not stack any file groups to the 3480 cartridge until it can locate a set of groups with a total size of at least 200 megabytes but not exceeding 300 megabytes. Once all of the file groups have been successfully stacked to the tape, they will be deleted from disk. All of the processing messages will be logged in the file [ADAPS.LOG]AUTOSFL;LOG, a tape summary file called [ADAPS.ARCHIVE]SUMMARY;LIST will be created, and a tape label will be printed.
If the file [ADAPS.TABLES]AUTOSFL.4;STOP appears before ANSISTACK has located a group of files to stack, the tape will be dismounted, and the function will complete successfully. If an error is encountered stacking any of the file groups to tape, the offending file group will be moved into the [ADAPS.ERROR] directory, all remaining file groups will be moved back into the original directory, and the tape will be dismounted and assumed to be bad.
ANSISTACK will create a temporary subdirectory in the directory where the files are located, lock the input directory (see User Note 5), select a set of groups to be stacked, move them into the temporary directory, and unlock the input directory. Once this has been done, ANSISTACK will rename all of the files to an appropriate tape name (see User Note 6), stack each of the groups to tape, and rename each of the files back to their original disk name. Finally, depending upon FILEOPT, ANSISTACK will move the files back to their original directory, move them to a specified output directory, or delete them from disk. For a detailed explanation of the way each of the different tape types are stacked see User Note 2.
A nonfatal error was encountered while stacking a file group to tape. See User Note 7.
ANSISTACK encountered an error while writing file <xxxxx> to tape. The entire file group is moved into ERRDIR and either the ansistack-fstack or ansistack-nstack error message will be displayed. See User Note 7.
ANSISTACK was unable to dynamically allocate memory. Rerun the program and, if the error persists, contact the system administrator.
The tape that was mounted is not an ANSI labeled tape. Ensure an ANSI labeled tape is available and run the program again.
The specified tape drive will not allow ANSISTACK to append files to a tape. Run the program again with another tape drive.
The parameter <xxxxx> must contain <yyy> values. A record size and block size must be supplied for INFILE and each entry of AFTYPE. Ensure the specified parameter contains the correct number of values and run the program again.
ANSISTACK was unable to determine the type of tapes used on drive <xxx>. Contact the system administrator to ensure the tape;config file in LASTABLES is up-to-date.
A fatal error was encountered. The message displayed preceding this message is the error that was encountered. Processing terminates.
A fatal error was encountered while stacking a file group to tape. See User Note 7.
ANSISTACK was unable to locate all of the file groups in the temporary stacking directory <xxxxx>. Move all the files located in this directory back to their original directory, delete the temporary directory, and run ANSISTACK again.
ANSISTACK was unable to lock the directory specified in INFILE. The directory should be checked to ensure the user has write permission.
ANSISTACK was unable to create a temporary stacking subdirectory in the directory specified by INFILE. The directory should be checked to ensure the user has write permission.
An error was encountered mounting an ANSI initialized tape. Rerun the function and, if the error persists, contact the system administrator.
An error was encountered opening the specified file. Ensure the user has the appropriate write permissions.
When FILEOPT=MOVE, OUTDIR must be specified. Supply an output directory and run the function again.
An error was encountered renaming one of the file groups. Ensure the files matching INFILE have read and write permission for the user.
An error was encountered rewinding the tape. If the error persists, contact the system administrator.
ANSISTACK was unable to send a parameter value to TAE. Notify the system administrator.
The user specified drive <xxx> uses <yyyyy> type tapes, not the requested type <zzzzz>. Ensure the correct tape drive was specified or change the type of requested tape.
ANSISTACK was unable to delete the lock file in the directory specified by INFILE. The ansistack;lock file must be deleted from this directory before other copies of ANSISTACK will be able to stack files from this directory.
For low capacity 3480, 3490 and 9-TRACK type tapes, all the file groups that will be stacked to the tape are selected at one time. The utilization of these tapes is maximized by not stacking a set of file groups to the tape until their combined size exceeds MINBYTES.
The following is an example of a summary file.
TapeID: 02747 TapeType: 3480 Created: 01/03/1994 14:43:25 System: c3po Drive: 2 Owner: obiwan NGroups: 2 NFiles: 6 Tape filename Disk filename ----------------- ------------------------------------------ firstfilegroupr.a firstfilegrouprootname.ext1 firstfilegroupr.b firstfilegrouprootname.ext2 firstfilegroupr.c firstfilegrouprootname.ext3 secondfilegroup.a secondfilegrouprootname.ext1 secondfilegroup.b secondfilegrouprootname.ext2 secondfilegroup.c secondfilegrouprootname.ext3
If no files have been stacked to the tape, it will be dismounted and ANSISTACK will complete successfully. If the tape is a 8HI, 8LO, or 4MM type tape and at least one file group has been stacked, ANSISTACK will complete processing as if the tape were filled to capacity. Once the function has begun stacking files to a 3480, 3490, or 9-TRACK type tape, the stop file will have no effect. This is due to the fact that these types of tapes have a small capacity and a relatively short amount of time is required to fill the tape.
If multiple copies of ANSISTACK are to be run from the same input directory, a unique file name should be used for each version of ANSISTACK. This will allow the user to differentiate between the running versions and stop the correct one. When the function stops due to the existence of this file, it does NOT remove the file.
A. If all the file names within a file group are less than 17 characters long, none of the files are renamed. B. If the subcommand is AVHRR, the 17th character is set to '.' and the first character is set to 'H' for files with an ;AHDR extension and 'I' for files with an ;ARCH extension. C. If the subcommand is MSSX, the root file name for each file in the group will be different by one character. Therefore, if the root file name is less than or equal to 17 characters, no renaming is required. If the root file name is longer than 17 characters option D is used. D. If the root file name of the group is greater than 15 characters, truncate it to 15. The extensions ;A, ;B, ;C, etc. are appended to the root file name for each file in the group.
A. If ANSISTACK was stacking a 8HI, 8LO, or 4MM type tape and it successfully stacked at least one file group to the tape, a nonfatal error message will be issued, a tape label will be printed, and the function will complete successfully as if the tape were filled to capacity. B. In all other cases, a fatal error will be issued, the tape will be dismounted and considered bad, the other file groups will be moved back to their original directory, and the function will complete unsuccessfully.
A. ANSISTACK creates a subdirectory named "ANSISTACK$JOB" in the directory where the input files are located. The LAS global variable $JOB is used to provide a standard but unique subdirectory name for each version of ANSISTACK that is running. In the event of a system crash the number of ANSISTACK subdirectories will indicate how many versions of ANSISTACK were working in a directory. B. If the file ANSISTACK;LOCK exists in the input directory, ANSISTACK was waiting for additional file groups to appear. This file must be deleted. C. If the file ZZZTAPELIST;LIST exists in the ANSISTACK$JOB subdirectory, that version of ANSISTACK was stacking a high capacity 8HI, 8LO, or 4MM type tape. This file is used to ensure all files that are stacked to a single tape have unique file names. This file must be deleted. D. If any other files exist in the ANSISTACK$JOB subdirectory, these files were being stacked to tape when the system crashed or the function failed. These files must be renamed to their disk names (See User Note 5) and moved back into the input directory. E. If a stop file exists, it should be deleted so new versions of ANSISTACK do not stop as soon as they are started. F. The ANSISTACK$JOB subdirectory must be removed. G. If a 8HI, 8LO, or 4MM type tape was being stacked, the tape summary file should be examined to determine how many file groups were successfully stacked to the tape. If the summary file is empty, the tape may be reused. If the summary file indicates that some file groups were successfully stacked to the tape, the tape should not be reused and a tape label should be printed. If a 3480, 3490, or 9-TRACK type tape was being stacked, all of the file groups will have been moved back into the input directory during step D so the tape may be reused.