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 the records based on a particular key using SYNCTOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Count the records based on a particular key using SYNCTOOL
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: 1452
Location: Chicago, IL

PostPosted: Fri Nov 11, 2005 11:18 am    Post subject: Re: Count the records based on a particular key using SYNCTO
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    Post subject: Re: Count the records based on a particular key using SYNCTO
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: 1452
Location: Chicago, IL

PostPosted: Fri Nov 11, 2005 12:02 pm    Post subject: Re: Count the records based on a particular key using SYNCTO
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    Post subject: Re: Count the records based on a particular key using SYNCTO
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    Post subject:
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    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 BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
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