Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reg Count of the records in a file using sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Sanath sekhar Reddy N

New User


Joined: 31 Oct 2012
Posts: 31
Location: INDIA

PostPosted: Sun Mar 24, 2013 12:18 am    Post subject: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Mar 24, 2013 12:37 am    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sun Mar 24, 2013 12:40 am    Post subject:
Reply with quote

Please show the ICETOOL application you've used. If you're using "NODETAIL ",try after removing that.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Sun Mar 24, 2013 3:48 am    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
Sanath sekhar Reddy N

New User


Joined: 31 Oct 2012
Posts: 31
Location: INDIA

PostPosted: Mon Mar 25, 2013 6:54 pm    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 25, 2013 6:56 pm    Post subject: Re: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
Sanath sekhar Reddy N

New User


Joined: 31 Oct 2012
Posts: 31
Location: INDIA

PostPosted: Mon Mar 25, 2013 7:26 pm    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon Mar 25, 2013 7:45 pm    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

You have SyncSort, so topic moved the JCL part of the forum, where SyncSort topics should be.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon Mar 25, 2013 7:50 pm    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
Sanath sekhar Reddy N

New User


Joined: 31 Oct 2012
Posts: 31
Location: INDIA

PostPosted: Mon Mar 25, 2013 8:02 pm    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon Mar 25, 2013 8:05 pm    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Mon Mar 25, 2013 8:10 pm    Post subject:
Reply with quote

Bill,

I am the forum prognosticator today.

I predict:
Quote:
Please provide me the code for same
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Mon Mar 25, 2013 8:14 pm    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon Mar 25, 2013 8:24 pm    Post subject: Reply to: Reg Count of the records in a file using sort
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us