Quote:
In UniVerse, HASH.HELP [filename] will also give you the Tpye/Mod/Sep |
GROUP.STAT is quicker. It immediately lists the type mod sep in the
header. Won't make recommendations like HASH.HELP, though.
I have a set of DICT VOC I-descriptors for use with F- & Q-VOC items.
It calls a subroutine that opens the file & uses FILEINFO() and STATUS
statment to get info about the file. (type,mod,sep,os
path,date-time-modified, etc., etc., etc. )
The subroutine uses labeled common to hold the name of the last file
analyzed and the FILEINFO & STATUS results. That way, if you happen to
call the subroutine for multiple data for the same file via multiple
i-descriptors:
LIST VOC "CUSTOMER.MASTER" DATA.TYPE DATA.MOD DATA.SEP DATA.PATH
then, because of labeled common, the dirty work of opening & analyzing
is done only once.
DICT VOC. Typ F2...................................
DATA.TYPE I SUBR( '*FSTAT', @ID, 'TYPE' )
DATA.MOD I SUBR( '*FSTAT', @ID, 'MOD' )
DATA.SEP I SUBR( '*FSTAT', @ID, 'SEP' )
DATA.PATH I SUBR( '*FSTAT', @ID, 'PATH' )
DICT.TYPE I SUBR( '*FSTAT', 'DICT ':@ID, 'TYPE' )
. . . etc. . . .
labeled common works like this:
SUBROUTINE FSTAT( OUTARG, FNAME.INARG, CTRL.INARG )
COMMON /FSTAT/ LAST.FNAME, FINFO.AND.STATUS
IF LAST.FNAME # FNAME.INARG THEN
OPEN FNAME.INARG TO FVAR ELSE OUTARG = ''; RETURN
[pack FINFO.AND.STATUS with FILEINFO & STATUS stmt data]
LAST.FNAME = FNAME
END
OUTARG = [extract desired datum from FINFO.AND.STATUS based on
CTRL.INARG]
RETURN