IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Count the records based on a particular key using SYNCTOOL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raajan_p

New User


Joined: 19 Sep 2005
Posts: 17

PostPosted: Fri Nov 11, 2005 10:06 am
Reply with quote

Hi All,

I have a file which is of below mentioned layout.
Length
Name : 01 20

Design 21-23 ? it can accept values like PAT,PA,A,SA,APM,PM,SPM and so on........

I need to code a jcl which will give me a count of records for each designation in the input file.

Is it possible to do it using SYNCTOOL or any other utility.Thanks in Advance.

Regards,
Raajan
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Nov 11, 2005 11:18 am
Reply with quote

Hi Raajan,

Do you have a fix list of this field (Design) or it is varying & can have any char value of length 3 chars.

Regards,

Priyesh.
Back to top
View user's profile Send private message
raajan_p

New User


Joined: 19 Sep 2005
Posts: 17

PostPosted: Fri Nov 11, 2005 11:51 am
Reply with quote

Hi Priyesh,

the designation field varies. the case is like

there are more than 50 different designation with more than 500 records for each designation.

so i want to have the result as

Designation Record Count

PA 000500
A 000700 and so on.

Is it possible to it with SYNCTOOL or any other utility.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Nov 11, 2005 12:02 pm
Reply with quote

Hi Raajan,

If you know, that value for design field will be one among a set of 50 values, then it can be done with DFSORT. Dont know about SYNCTOOL.

In DFSORT, file can be splitted based on DESIGN Filed & then can have a count for that splitted Temp file.

There may be much improved solution in DFSORT itself for the same problem... but will have to wait for that till it FRANKs....

Regards,

Priyesh.
Back to top
View user's profile Send private message
raajan_p

New User


Joined: 19 Sep 2005
Posts: 17

PostPosted: Fri Nov 11, 2005 12:22 pm
Reply with quote

Hi Priyesh,

But the sad news is we dont have DFSORT Utility in our mainframe shop. :( .Cant it be done through SYNCSORT.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Wed May 10, 2006 2:22 am
Reply with quote

Rajan,

I know its too late to answer your question,

but this is how it can be done using syncsort

//JZ1B0CFS JOB (@@@@@@@@,@@,9999,9999,,9999),'JZ1B0C JOB',
// MSGCLASS=Q,CLASS=0,
// NOTIFY=&SYSUID,
// RESTART=STEP010
//*
//STEP010 EXEC PGM=IEFBR14
//*
//STEP020 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AA1--3
AA1--4
AA1--3
AA2--5
AA2--5
AA2--5
AA3--1
AA3--2
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC FIELDS=(1:1,3,
18:C'0000000001')
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=(18,10,ZD)
OUTREC FIELDS=(1:1,3,
10:18,10)
/*
//*


here is how the output comes


AA1 0000000003
AA2 0000000003
AA3 0000000002
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top