Shrikant,
I do this sort of thing in a Unix environment all the time. The first thing you need is a generic master that I call LINE80.
FILE=LINE80 ,SUFFIX=FIX
SEGNAME=LINE80,SEGTYPE=S01
FIELDNAME=LINE80, ALIAS=LN80 ,FORMAT=A80, ACTUAL=A80,$
Then you need some sort of operating system command (maybe LISTMEM) that lists the members of the PDS and you have to pipe the output to a file. You might be able to use APP commands.
quote:
APP QUERY app HOLD Writes a list of all files in the directory app to a file focappl.ftm in EDATEMP; the output is described by focappq.mas.
You would have to set the APP PATH first to point to only that directory.
Next (assuming we are using APP QUERY), TABLE focappq and write the focexec names to a SAVE file.
Then filedef an output file, let's call it FEXCOUNT, and make sure that you have (APPEND at the end of the filedef. You are going to be building this file as you go.
Then set up a loop using -REPEAT and -READ to loop through the SAVE file. For each entry, filedef the master LINE80 to this member of the PDS. Then,
DEFINE FILE LINE80
FEXNAME/A8='&FEXNAME';
END
TABLE FILE LINE80
COUNT LINE80 AS LINECNT
BY FEXNAME
ON TABLE HOLD AS FEXCOUNT FORMAT ALPHA
END
Then loop and get the next one.
When you are done, the file FEXCOUNT contains a list of all the focexecs and the number of lines in each.
I don't know if this will be any faster but it is certainly doable. This is just a mix of Dialogue Manager, APP commands, filedefs, and TABLE.
I could write the code for you but that would take all the fun out of it for you. Give it a try.
Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google