v1.10 |
509 Center Bay City, Michigan Sales (989) 892-9242             Support (989) 686-8860 |
|
Other links:
FINDFILE: - This is a SUNBELT ONLY language feature.
CONCEPT OF USE
The FINDFILE instruction provides a fast way of gathering information about a fail such as the size, path, date updated, and attributes.
This is a very simple instruction. You just code FINDFILE {filename}, FILESIZE=xxxx and the information is returned.
The file does not have to be opened.
Wild cards are accepted in the file name.
There's a general routine in the MMCCSERV.PLS include unit and there are work fields defined in COMMONWK.PLS as follows:
COMMONWK.PLS fields:$FF_NAME DIM 250 ;pass this name in or clear yourself $FF_DATA LIST $FF_ERROR DIM 5 $FF_SIZE FORM 10 $FF_TIMESTAMP DIM 18 $FF_ALTNAME DIM 250 $FF_ATTRIBUTES INTEGER 4 $FF_PATH DIM 250 $FF_ALTPATH DIM 250 LISTENDMMCCSERV.PLS routine:find_file ROUTINE $FF_NAME DISPLAY *COLOR COL$10,*EL: "MMCCSERV:find file ",*HON,*LL,$FF_NAME,*HOFF: *COLOR COL$POP UNPACK NUL, $FF_DATA ;all but $FF_NAME FINDFILE $FF_NAME: FILESIZE=$FF_SIZE: WRITE=$FF_TIMESTAMP: NAME=$FF_NAME: ALTNAME=$FF_ALTNAME: ATTRIBUTES=$FF_ATTRIBUTES: PATH=$FF_PATH: ALTPATH=$FF_ALTPATH IF NOT ZERO MOVE "FAIL",$FF_ERROR ENDIF RETURN
NOTES
FINDFILE requires the FULL PATH and NAME for the file. If you have just opened the file and want to use FINDFILE to get stuff line the date and size, you'll need to get the path another way. For that you can use GETFILE with the TXTNAME property. This is the full name and path............................ . Example . MYFILE FILE FILENAME DIM 250 OPEN MYFILE, "ZZDATA" GETFILE MYFILE, TXTNAME=FILENAME IF ZERO DISPLAY "File name is ",*HON,*LL,FILENAME,*PL,*HOFF ELSE DISPLAY "File is NOT OPEN" ENDIFSee GETFILE in the FILE HANDLING NOTES report.
CONTENTS INDEX v1.10 |
Send e-mail to MMCC. |