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 CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm


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