parm fileset=@ anyparm boolean=true comment comment This command file lets the caller perform simple MPEX-like queries comment using boolean expressions composed of FINFO calls. The syntax: comment comment :LISTFX [fileset][,boolean_expr] comment comment Where: comment comment fileset = a :LISTFILE fileset comment comment boolean_expr = a modified CI boolean expression. To code a FINFO comment call, specify [finfo_mnemonic]. comment comment Example: comment comment :LISTFX @.@,[fmtfcode] = 'PROG' and [intaccessed] < 19910101 comment comment Author: comment comment Mark Bixby comment Coast Community College District comment District Information Services comment 1370 Adams Ave comment Costa Mesa, CA 92626-5429 comment +1 714-438-4647 comment markb@cccd.edu comment comment Download this CI command file from: comment comment ftp://ftp.cccd.edu/pub/mpe/listfx comment or comment http://www.cccd.edu/ftp/pub/mpe/listfx comment if '!fileset' <> '~' then comment comment copy the boolean expression into a variable in a way that will not comment interact with any quotes (") or squotes(') comment echo !boolean >listfxfs input listfx_boolean 0 or jcw <> 0 then echo The boolean expression is invalid! purge *listfxfs reset listfxfs deletevar listfx_@ return endif comment comment generate the list of files to be examined comment purge *listfxfs file listfxfs;rec=-256,1,v,ascii;disc=25000 continue listfile !fileset,qualify >*listfxfs file listfxfs,oldtemp if cierror = 0 and jcw = 0 then setvar listfx_eof FINFO('*listfxfs','eof') setvar listfx_hpautocont hpautocont setvar listfx_hpmsgfence hpmsgfence setvar hpautocont true setvar hpmsgfence 2 LISTFX.PUB.CCCD ~ <*listfxfs setvar hpautocont listfx_hpautocont setvar hpmsgfence listfx_hpmsgfence setvar cierror listfx_cierror setvar jcw listfx_jcw else print *listfxfs;page=0 endif if BOUND(f) then deletevar f endif purge *listfxfs reset listfxfs deletevar listfx_@ else comment comment for each filename, evaluate the boolean expression comment setvar listfx_count 0 while listfx_eof > 0 do input f setvar cierror 0 if !listfx_boolean then comment comment obtain & format data for each filename selected by the boolean comment setvar listfx_fcode '' setvar listfx_fcode FINFO(f,'fmtfcode') if listfx_fcode <> '' and NUMERIC(listfx_fcode) then setvar listfx_fcode !listfx_fcode if listfx_fcode > 32767 then setvar listfx_fcode listfx_fcode - 65536 endif setvar listfx_fcode '!listfx_fcode' endif setvar listfx_fcode LFT(listfx_fcode+RPT(' ',6),6) setvar listfx_cre LFT(FINFO(f,'creator')+RPT(' ',7),8) if cierror = 9988 or cierror = 9989 then setvar listfx_cre 'N/A ' setvar cierror 0 endif setvar listfx_cd '![FINFO(f,'intcreated')]' setvar listfx_cd STR(listfx_cd,5,2)+'/'+STR(listfx_cd,7,2)+'/'+& STR(listfx_cd,1,4) setvar listfx_md '![FINFO(f,'intmoddate')]' setvar listfx_md STR(listfx_md,5,2)+'/'+STR(listfx_md,7,2)+'/'+& STR(listfx_md,1,4) setvar listfx_ad '![FINFO(f,'intaccessed')]' setvar listfx_ad STR(listfx_ad,5,2)+'/'+STR(listfx_ad,7,2)+'/'+& STR(listfx_ad,1,4) if cierror = 0 then setvar listfx_count listfx_count + 1 if listfx_count = 1 then echo Filename Fcode Creator & Created Modified Accessed echo -------------------------- ------ -------- & ---------- ---------- ---------- endif echo ![LFT(f+RPT(' ',21),26)] !listfx_fcode !listfx_cre & !listfx_cd !listfx_md !listfx_ad endif endif setvar listfx_eof listfx_eof - 1 endwhile if listfx_count = 0 then echo No files matched the selection criteria. endif endif