View previous topic :: View next topic
|
Author |
Message |
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
Please advice me on the below.
There is a to and fro file transaction happens between two systems.
I have a requirement to verify the number of records received with the Number of records that I actually send.
Is there any utility to count the number of records in a Flat file. Today we use a simple COBOL program to get the count using the file. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Your sort product is probably the easiest and quickest way. Use the search facility at the top of this screen and you'll get lots of hits. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
SORT and FILEAID come to mind.
Gerry |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Google will oftentimes yield better results than a bulletin boards own search facility. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Terry,
one wonders
if google does better searches,
or
has a better interpreter of 'what did he mean by that?'. |
|
Back to top |
|
|
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
Thank you very much for your advice.
Code: |
//STEP04 EXEC PGM=ICETOOL,
// COND=(1,EQ)
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*
//IN1 DD DSN=FILE-1
// DISP=SHR
//*
//IN2 DD DSN=FILE-2
// DISP=SHR
//*
//OUT DD DSN=OUTFILE
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(200,20),RLSE),
// DCB=(RECFM=VB,LRECL=1060,BLKSIZE=0)
//*
//*
//TOOLIN DD * *** CONSTANT CONTROL CARDS ***
COPY FROM(IN1) TO(OUT) USING(CTL1)
COPY FROM(IN2) TO(OUT) USING(CTL2)
//*
//CTL1CNTL DD * *** CONSTANT CONTROL CARDS ***
OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,TRAILER1=(COUNT)
//CTL2CNTL DD * *** CONSTANT CONTROL CARDS ***
OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,TRAILER2=(COUNT)
/*
// |
I am trying with the above code,
The requirement is like i have 2 input datasets and the number of records in each dataset should be written as separate record in a single output file.
But the above code gives only the Second file count,
I am looking for an output like below in the same output file
Count of IN1 File
Count of IN2 File
Please advice. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
suggest you repost in the dfsort/icetool forum |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
quoting verbatim expat with the proper legalese about copyright, IP ownership, fair use assumption, the usual blah blah
Quote: |
Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.
If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.
If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.
Code: |
//SORTSTEP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY |
You also need to provide more detail than you already have.
What is the DSORG, RECFM & LRECL of the input file. |
and after thatI' ll move to the proper forum
I guess it' s just time to open a new section ...
"counting forum"
along with "duplicate elimination",
and ... ... ... |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
change your TRAILER2 to TRAILER1 and change the
DISP=(NEW,CATLG,DELETE) to DISP=(MOD,CATLG,DELETE)
Gerry |
|
Back to top |
|
|
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
Thank you Gerry
It worked. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Glad to hear it
Gerry |
|
Back to top |
|
|
|