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
 

 

COUNT of copied records using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Tue Apr 22, 2008 2:41 pm    Post subject: COUNT of copied records using SYNCSORT
Reply with quote

Hi,

I am copying INPUT to OUTPUT using some rules.

I would like to how many records are copied to OUTPUT. In other words, i would like to how many records are there in OUPUT.

Can i do this using SYNCSORT?
Back to top
View user's profile Send private message

kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Tue Apr 22, 2008 3:18 pm    Post subject: Reply to: COUNT of copied records using SYNCSORT
Reply with quote

Here a sample JCL

//SORT EXEC PGM=SORT
//SORTIN DD *
1234
1234
2345
/*
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTOF01 DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,4,CH,A)
INCLUDE COND=(1,1,CH,EQ,C'1')
OUTFIL FILES=01,OUTREC=(1,80),REMOVECC,
TRAILER1=(1:C'TRR',COUNT=(M10,LENGTH=9))
/*

In SORTOF01 you get the output as
1234
1234
TRR 2

You may change the trailer as per your need.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Apr 22, 2008 7:47 pm    Post subject:
Reply with quote

Hello,

Even without the trailer, i believe the count of records processed will be in a jes output.
Back to top
View user's profile Send private message
vch

New User


Joined: 01 Feb 2008
Posts: 22
Location: chennai

PostPosted: Wed Apr 23, 2008 5:20 pm    Post subject:
Reply with quote

Hi


Can anyone explain me TRAILER1=(1:C'TRR',COUNT=(M10,LENGTH=9)) statement. i.e. M10 LENGTH words are for what purporse?
Back to top
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Wed Apr 23, 2008 5:39 pm    Post subject: Reply to: COUNT of copied records using SYNCSORT
Reply with quote

TRAILER1=(1:C'TRR',COUNT=(M10,LENGTH=9))

COUNT --> Gives the count of records in the dataset

M10 --> Mask (how the count should be displayed e.g. with or without signs, supressing leading zeroes etc.)

M10 --> IIIIIIIIIIIIIIT --> if there are 2 records--> Count is displayed as bbbbbbbb2

For other masks refer manual (M0 - M25)

Length --> length of count (here 9 digits)
Back to top
View user's profile Send private message
vch

New User


Joined: 01 Feb 2008
Posts: 22
Location: chennai

PostPosted: Wed Apr 23, 2008 5:56 pm    Post subject:
Reply with quote

Thank you kalukakkad
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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