View previous topic :: View next topic
|
Author |
Message |
Sanath sekhar Reddy N
New User
Joined: 31 Oct 2012 Posts: 30 Location: INDIA
|
|
|
|
Hi
I am having a file with records more than 2 lakhs ,i need to know the count of the number of records in the output file along with the data.
I have used the COUNT operator in ICETOOL ,but this ais giving only count in output file but not the data.
I require data also copied from input file to output file along with the count of records. |
|
Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10866 Location: italy
|
|
|
|
if You look at the output of a sort You will see that the record counts are displayed .
on the other side You did not post enough info to provide a better answer. |
|
Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Please show the ICETOOL application you've used. If you're using "NODETAIL ",try after removing that. |
|
Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Please show some sample input, with expected output. Tell us the RECFM and LRECL of both files.
Please run this, and post the sysout for the step here (all the sort messages, with the message codes visible), so we can see what level your Sort is.
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/* |
|
|
Back to top |
|
 |
Sanath sekhar Reddy N
New User
Joined: 31 Oct 2012 Posts: 30 Location: INDIA
|
|
|
|
Hi
Thanks you very much for the response.
iamhaving the below file .
100003521parkstreet mh5213
100003522skelmesdale jl5124
100003523macchester kl5215
i want to get the record count in separate file and inputdata sorted in separate file using sort or icetool ?
Please help.
Cheers
Sanath |
|
Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Bill Woodger wrote: |
Please run this, and post the sysout for the step here (all the sort messages, with the message codes visible), so we can see what level your Sort is.
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/* |
|
|
|
Back to top |
|
 |
Sanath sekhar Reddy N
New User
Joined: 31 Oct 2012 Posts: 30 Location: INDIA
|
|
|
|
Hi
Pls see the post here below
********************************* TOP OF DATA
OPTION COPY 000
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER054I RCD IN 1, OUT 1
WER169I RELEASE 1.3 BATCH 0513 TPF LEVEL 2.2
WER052I END SYNCSORT -
******************************** BOTTOM OF DATA *****************************
********************************* TOP OF DATA **********************************
00080000
80; BLKSIZE= 80
80; BLKSIZE= 80
CTIVE
1
L 2.2
G=C662
******************************** BOTTOM OF DATA ********************************
regards
Sanath |
|
Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You have SyncSort, so topic moved the JCL part of the forum, where SyncSort topics should be. |
|
Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You will need a SORT statement, with whatever your key is.
Then you need an OUTFIL, with REMOVECC and using the COUNT in TRAILER1.
If you search here for OUTFIL REMOVECC COUNT and TRAILER1 (all of them, not any of them) then you should find some useful samples that you can amend. |
|
Back to top |
|
 |
Sanath sekhar Reddy N
New User
Joined: 31 Oct 2012 Posts: 30 Location: INDIA
|
|
|
|
Hi
Thank you for the response
I do not need count in the trailer,
I require the count in the separate file .
Regards
Sanath |
|
Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK, so two OUTFILs. One just to have for the sorted data, the second, with what I've previously mentioned and NODETAIL. |
|
Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Bill,
I am the forum prognosticator today.
I predict:
Quote: |
Please provide me the code for same |
|
|
Back to top |
|
 |
sandip_mainframe Warnings : 2 New User

Joined: 20 Sep 2006 Posts: 63 Location: pune
|
|
|
|
Hi Sanath,
You can use below JCL -
Code: |
//STEP1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD *
100003521PARKSTREET MH5213
100003522SKELMESDALE JL5124
100003523MACCHESTER KL5215
//SORTOF01 DD SYSOUT=*
//SORTOF02 DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,
OUTREC=(1:80X),
TRAILER1=(1:COUNT15),
NODETAIL,
INCLUDE=ALL
OUTFIL FILES=02,INCLUDE=(01,01,CH,EQ,C'1')
/* |
|
|
Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Code: |
//STEP1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD *
100003521PARKSTREET MH5213
100003522SKELMESDALE JL5124
100003523MACCHESTER KL5215
//SORTOF01 DD SYSOUT=*
//SORTOF02 DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(whatyouwanttosorton)
OUTFIL FILES=01,
TRAILER1=(1:COUNT15),
NODETAIL,
REMOVECC
OUTFIL FILES=02
/*
|
|
|
Back to top |
|
 |
|