Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us