View previous topic :: View next topic
|
Author |
Message |
raajan_p
New User
Joined: 19 Sep 2005 Posts: 17
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
raajan_p
New User
Joined: 19 Sep 2005 Posts: 17
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
raajan_p
New User
Joined: 19 Sep 2005 Posts: 17
|
|
|
|
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 |
|
|
jz1b0c
Active User
Joined: 25 Jan 2004 Posts: 160 Location: Toronto, Canada
|
|
|
|
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 |
|
|
|