Isis 2 Documentation
getfname - Return index(th) filename to calling procedure "getfname" is to be used by TAE procedures that need to process a list of filenames. This list is entered with the parameter FROMLIST. This will return all columns of filenames on the INDEX(th) line of FROMLISTin the parameter FNAMES. NOTE: "getfname" can only be called from within a procedure Programmer: Tracie Sucharski, U.S.G.S, Flagstaff
Parm | Description | Default |
---|---|---|
FROMLIST | Name of file which holds list of filenames. | NONE |
INDEX | Index into filename list- which filename to return in FNAMES. | NONE |
FNAMES | Returned filenames. |
ADDITIONAL NOTES:
Parm | Description |
---|---|
FROMLIST | This file contains a list of file names that the procedure is to process. This list can contain muliple columns of filenames. This file may be produced with the following command: ls -1 filename.* > list.lis |
INDEX | This program will return the INDEX(th) filename from the above list of file names. It will return all columns of filenames on the INDEX(th) line of FROMLIST. The filenames will be returned to the calling procedure in the parameter, FNAMES. If the end of the list is reached, "getfname" will set FNAMES(1)=end. |
FNAMES | If there are multiple columns of filenames, you must declare the fnames parameter in your procedure to reflect this. This must be done even if you are not using all columns. To check for the end of the file, look for "end" in the first position of the fnames parameter. Here is an example of a procedure that would use "getfname" to return 3 columns of filenames. * PROCEDURE HELP=* * PARM FROMLIST TYPE=(STRING,128) * LOCAL J INTEGER,INITIAL=0 * LOCAL FILES TYPE=(STRING,128),COUNT=1:3 * BODY * * LOOP * LET J = J + 1 * GETFNAME &FROMLIST &J FILES * IF (FILES(1) = "end") BREAK * * * You would continue here using the filenames * returned in FILES to pass into whatever program * you needed. * * END-LOOP * END-PROC * * .END |
Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov