MMCC MASTHEAD


INDEX

v1.10
Mid-Michigan Computer Consultants, Inc.
509 Center
Bay City, Michigan

Sales (989) 892-9242             Support (989) 686-8860


VISUAL PL/B Language
FILELIST for managing multiple indexes
NOTE TO OUR READERS
This web resource is written for our own use. But we feel strongly that the PL/B language should be shared with the software community. So feel free to use this at will! BUT PLEASE... if you find errors or omissions or have a better way to do something. TELL US! Dialog helps us all. Send e-mail to: support@mmcctech.com
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
         LISTEND
MMCCSERV.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"
       ENDIF
See GETFILE in the FILE HANDLING NOTES report.


CONTENTS
INDEX

v1.10
Send e-mail to MMCC.

Write to MMCC Technical Support at:
MMCC, Inc.
600 W. Midland
Bay City, MI 48708
(989) 686-8860
| Home   |

© 1997 MMCC, Inc. All Rights Reserved.

Report problems or suggestions to support@mmcctech.com
Site hosted by Molarnet Technologies

Since 09/14/1998