View previous topic :: View next topic
|
Author |
Message |
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
Is there a JCL which we could use to count the number of records of a flatfile/dasd file or tape file?
Its just that I could not count if through max down then just look to the number of rows then thats it..
so I was hoping to have a JCL for this..
Thanks. |
|
Back to top |
|
|
sandeep1dimri
New User
Joined: 30 Oct 2006 Posts: 76
|
|
|
|
HI
You can use file aid with Tally option
Code: |
//SYSIN DD *
$$DD01 TALLY
/* |
Quote: |
instead of copying it to another ds |
But this utily stlll can't cope with ur above requirement |
|
Back to top |
|
|
0d311
Guest
|
|
|
|
Hi Lui,
What do you mean by 'count'? Is there some sort of record ID which we can look up in the records? |
|
Back to top |
|
|
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
it resulted to max=8
having this as sysin:
$$DD01 TALLY
BTS01-UNABLE TO LOCATE TIOT ENTRY FOR DD01 .
.....SKIPPING TO NEXT $$DD CARD RC=8
any idea? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Use ICEGENER with a DUMMY for SYSUT2.
Not the neatest of ways, but it works. |
|
Back to top |
|
|
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
count means just giving out the number of records through sysout instead of putting it to dataset or copying the dataset.
Iebgener..Is there a sample JCL for this? |
|
Back to top |
|
|
madlui56
New User
Joined: 08 Aug 2006 Posts: 61 Location: Philippines
|
|
|
|
Is this the right code for Iebgener?
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUT1 DD DSN=WXX220.ECL2.ADHOC.FHFILE,DISP=SHR
//SYSUT2 DD DUMMY
//SYSIN DD *
/*
Thnks |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
jose.jeyan
New User
Joined: 28 Jul 2006 Posts: 60 Location: Mumbai
|
|
|
|
you can use the count in the control cards and you can get it in the sysout=* |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
madlui56 wrote: |
it resulted to max=8
having this as sysin:
$$DD01 TALLY
BTS01-UNABLE TO LOCATE TIOT ENTRY FOR DD01 .
.....SKIPPING TO NEXT $$DD CARD RC=8
any idea? |
Below JOB is working for me, give a try.
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 shows the following:(please see RECORDS-READ=5)
Code: |
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
|
Hope this helps. |
|
Back to top |
|
|
|