...
All ECFS commands specifying a single operation return the value 0 if successful, and an error code > 0 otherwise. However, as with Unix, ECFS commands may specify a number of operations, either due to multiple arguments or to wildcard expressions. In such cases, ECFS will always attempt to carry out all operations, even if some intervening operations are not successful. If all such operations for a command are successful, the return code will be 0; if some of the operations are not successful, the return code will be 1; if fatal errors are incurred, the entire command is discontinued, and the error number > 1 is returned with an explanatory message.
Optimising ECFS read access
If you want to extract large amounts of data from ECFS, we would recommend you to transfer the files in the order in which they are written to tapes. This can be done with the '–order=tape' option of the ecp and emv commands. This option is also available for the els command,
Listing files - example
ecd ec:<ecfs_path_name> els -l --order=tape ec:2020010100/f* |
Note that the path name given to 'els' should be relative. This command shows the files selected with the tape number they are written to together with their position on tape. Files on disk are have no tape information. E.g.:
# ECFS files on disk 2020100100/file1 # files on tapes |
Getting files
ecd ec:<ecfs_path_name> cat>sourcelist<<eof ecp --order=tape -F sourcelist <local_directory> |
Note that you have to use the sourcelist option.
Error handling
The following techniques are suggested for trapping ECFS error codes when running batch scripts in the Korn shell environment:
...
- DON'T archive many small files separately. ECFS is most efficient at handling a small number of large files. Thus
- DO tar and compress (or gzip) many small files into one large file when archiving (say) a directory or use the
ecfsdir
command. - DON'T copy in/out the same files frequently.
- If you wish to archive files for a short period only (less than 90 days) DO store them in the
ectmp:
domain. Then they will be automatically deleted after 90 days without any further action from you. Check the existence of a local copy before getting the ECFS version of a file:
#!/bin/ksh if [ ! -r $SCRATCH/myfile ] then ecp ec:myfile $SCRATCH/. fi
- If it is required to store a large number ( > 5000) of files into ECFS then DO contact User Support the Service Desk in advance to discuss the most efficient way to store/retrieve this large number.
...