View previous topic :: View next topic
|
Author |
Message |
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
Hi
Is there any TSO command or anyother easiest way to find out number of records in a PS( not PDS)?
I've a huge file..
I can't open in browse mode and do M+ F8 as it is taking more and more time.
I can't open in File-Aid either, as it is also giving memory insufficient..
if u have any rexx code to count records.. please do share..
Thanks
Sri |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you lok into using the SORT product on your system (or some other utility) to count the records.
If there is a "huge file" a roll-your-own approach will not perform as you want/need. |
|
Back to top |
|
|
Guest
|
|
|
|
Hi srinut123,
You can use the below jcl to find the records in a PS
Code: |
//STEP1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=input.file,DISP=SHR
//OUT DD SYSOUT=*
//TOOLIN DD *
COUNT FROM(IN) WRITE(OUT) DIGITS(8)
/*
|
*) If you specifically want a rexx tool for the same then you can submit the above jcl using Rexx.
*) You can also use the "TALLY" function in file-aid but this is also a foreground option.
devil13
There is always a better solution. |
|
Back to top |
|
|
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
Thanks all for your replies. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
devil13 wrote: |
*) You can also use the "TALLY" function in file-aid but this is also a foreground option. |
Code: |
//FASTEP EXEC PGM=FILEAID,REGION=6M
//STEPLIB DD DISP=SHR,DSN=SYS1.NSMP.LINKLIB
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=HLQ.FIRST.FILE,
// DISP=SHR
//*
//SYSIN DD *
$$DD01 TALLY
/*
//* |
SYSPRINT:
Quote: |
DD01 DSN=HLQ.FIRST.FILE OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=MIZAB8
$$DD01 TALLY 00100000
ABOVE FUNCTION ENDED ON NORMAL EOD RC=0
RECORDS-READ=5
|
|
|
Back to top |
|
|
Guest
|
|
|
|
Hi Anuj,
Thanks. I have learnt one more new thing today.
devil13
There is always a better solution. |
|
Back to top |
|
|
|