MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Display the Counts of 1000 files in a single dataset

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Wed Nov 09, 2005 2:03 am    Post subject: Display the Counts of 1000 files in a single dataset Reply with quote

Hi All,

I have around 1000 files, I want to know the records count of the each files. currently, I'm using te SORT FIELDS = COPY option and SORTOUT is DUMMY for all the files. In the SDSF, I see the number of records in and number of records out. But I want to display the input filename in SYSOUT, so that I can identify it's belongs to which file. Is there any option to display the input file name in SDSF (SYSOUT)

Any ideas would be greatly appreciated. Thank you.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Nov 09, 2005 2:37 am    Post subject: Reply with quote

GHaridoss,
Are you concatenating all files to SORTIN of 1 step (You cannot have so many concatenations anyway) or do you have 1000 steps each running a dummy sort job ?

Your requirement is a bit tricky and this is not possible with SORT alone. You may need to use a high level language like COBOL / REXX to accomplish this - along with SORT.

Follow these steps:
Step 1. Code a SORT step with as much datasets concanated to sortin (all concatenated datasets must of same LRECL to get desired result). Route the Sysout to a dataset.

Step 2. invoke the rexx routine provided in the link below (provided by Kolusu). You need to play around with Control blocks to find the dataset name associated with a ddname. I suggest you first try the REXX routine - alone - couple of times to understand how it works.

http://mvsforums.com/helpboards/viewtopic.php?t=2608&highlight=jfcb

Thanks,
Phantom
Back to top
View user's profile Send private message
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Wed Nov 09, 2005 3:13 am    Post subject: Reply with quote

Hi Phantom,

I'm not able to do concatenation, because all the files are different record format and different record length varying form 30 - 4500 bytes.

I need this requirement for reporting purpose. currently I created 1000 sort steps to acheive this requirement.

Any ideas or suggestion would be greatly appreciated.

Thanks,
Haridoss
Back to top
View user's profile Send private message Send e-mail MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Nov 09, 2005 9:07 am    Post subject: Reply with quote

Deleted all wild goose chase posts in this topic by Admin.

Guys please slow down and try to answer correctly !

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Nov 09, 2005 9:18 am    Post subject: Reply with quote

gharidoss,

Check this topic which discusses a similar issue. The only change required would be the control cards as you have datasets with lrecl ranging from 35 to 4500 bytes

http://mvsforums.com/helpboards/viewtopic.php?p=10745#10745

Code:

//CTL1CNTL  DD   *
  OUTREC FIELDS=(SEQNUM,8,ZD,80:X)                                         
  OUTFIL FNAMES=OUT,NODETAIL,REMOVECC,                     
  TRAILER1=('TOTAL NO: OF RECORDS IN THE FILE:',COUNT,80:X)
/*


Check this topic for solution using sas

http://mvsforums.com/helpboards/viewtopic.php?t=2256&highlight=count+sas

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Nov 09, 2005 11:30 am    Post subject: Reply with quote

Quote:
But I want to display the input filename in SYSOUT, so that I can identify it's belongs to which file.


It seemed to me that the "problem" here was NOT to display the count, as that could be done in several different ways (e.g. ICETOOL COUNT, TRAILER1 COUNT, etc), but to display the input filename associated with the count.

This DFSORT/ICETOOL job might do if displaying the input ddname with the count is ok:

Code:

//S1    EXEC  PGM=ICETOOL     
//TOOLMSG   DD  SYSOUT=*       
//DFSMSG    DD  SYSOUT=*       
//IN0001 DD DSN=...  input file1                 
//IN0002 DD DSN=...  input file2                 
...   
//TOOLIN DD *                 
COUNT FROM(IN0001)             
COUNT FROM(IN0002)     
...       
/*                             


This will work for input files with any attributes. TOOLMSG would display the ddname and count for each input file in messages like this:

Code:

          COUNT FROM(IN0001)
ICE627I 0 DFSORT CALL 0001 FOR COPY FROM IN0001 ...
ICE628I 0 RECORD COUNT:  000000000000003
ICE602I 0 OPERATION RETURN CODE:  00

          COUNT FROM(IN0002)
ICE627I 0 DFSORT CALL 0002 FOR COPY FROM IN0002 ...
ICE628I 0 RECORD COUNT:  000000000000004
ICE602I 0 OPERATION RETURN CODE:  00

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Wed Nov 09, 2005 11:22 pm    Post subject: Reply with quote

Hi All,

Thanks for your updation. also I verified its' working fine.

Thanks
Haridoss
Back to top
View user's profile Send private message Send e-mail MSN Messenger
whizkid79
Beginner


Joined: 29 Sep 2004
Posts: 53
Topics: 14

PostPosted: Wed Mar 01, 2006 1:55 am    Post subject: Reply with quote

Is there a solution to find out the counts of files of recfm = VB?

I have a VB file of length 1200.

I'm using DFSORT with the following SYSIN parms:
Code:

SORT FIELDS=COPY
OUTREC FIELDS=(1:1,4,5,1196)                                   
OUTFIL FNAMES=SYSPRINT,NODETAIL,REMOVECC,               
TRAILER1=('TOTAL NO: OF RECORDS IN THE FILE:',COUNT)

I'm getting the following error:
SORTIN : RECFM=VB ; LRECL= 1200
OUTREC RECORD LENGTH = 1200
SYSPRINT : RECFM=VB ; LRECL= 1200
OUTREC - SHORT RECORD

Let me know how to solve this error.

Thanks,
Whizkid79.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Mar 01, 2006 4:23 am    Post subject: Reply with quote

whizkid79,

whizkid79,

You don't need an OUTREC FIELDS statement for counting the total no: of records. Try this

Code:

 SORT FIELDS=COPY
 OUTFIL FNAMES=SYSPRINT,NODETAIL,REMOVECC,               
 TRAILER1=('TOTAL NO: OF RECORDS IN THE FILE:',COUNT)


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
whizkid79
Beginner


Joined: 29 Sep 2004
Posts: 53
Topics: 14

PostPosted: Wed Mar 01, 2006 10:25 am    Post subject: Reply with quote

It worked. Thanks Kolusu.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group