PARM fileset=@.pub.sys # Reports NM and CM program files which have PM capability. Since two LISTFILEs # are done to get the full list of NMPRG and PROG files the final output will # not be in alphabetic order. # Note: HFS syntax is not supported by VERSION. if word(fsyntax('!fileset')) = "POSIX" then echo POSIX syntax names are not supported by the VERSION utility return endif # build the MSG files to hold LISTFILE and VERSION output purge progf >$null purge versf >$null build progf;msg;rec=-80,,f,ascii build versf;msg;rec=-80,,f,ascii file x=progf,old file y=versf,old # first list NM program files to a MSG file errclear continue listfile !fileset,6;seleq=[code=NMPRG] >*x if hpcierr > 0 then # print progf which contains the error print *x return elseif hpcierr < 0 then # hide warning and erase the contents of progf (the warn text). print *x >$null errclear endif # Now append CM program files to the same MSG file (progf). # This means that the output will not be in alphabetic order! continue listfile !fileset,6;seleq=[code=PROG] >>*x setvar peof finfo('*x','eof') if hpcierr > 0 then # got an error, maybe the progf file is full? Cannot display progf as # above since it could contain NMPRG files. Also cannot print a subset of # progf since FPOINT fails on MSG files. echo !hpcierrmsg return elseif hpcierr < 0 then # It would be nice to remove the last two records from progf, but # since it is a MSG file we cannot use :PRINT ;start=eof to do this. # Ignore the warn but remember the warn text is in progf! setvar peof peof-2 endif echo echo The following programs (out of !peof) have PM capability: echo setvar pcnt 0 errclear # read the combined LISTFILE,6 output and pass each filename to VERSION while setvar(peof,peof-1) >= 0 do input progname <*x setvar progname rtrim(progname) continue version !progname >*y if hpcierr = 0 then setvar veof finfo('*y','eof') while setvar(veof,veof-1) >= 0 do input vrec <*y if pos("CAPABILITIES:",vrec) = 1 or pos("CAP:",vrec) = 1 then setvar veof 0 if pos("PM",xword(vrec,':')) > 0 then echo !progname setvar pcnt pcnt+1 endif endif endwhile endif endwhile echo echo !pcnt programs have PM