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

SYNCSORT Count from the input file


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

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Fri Jan 09, 2009 11:28 pm
Reply with quote

Input File:

setno(16)---------------tot(4)--Pin(4)

4784311500001008 5160 1500
4784311500001016 5160 1000
4784311500001024 5160 1200
4784311500001032 7007 0500
4784311500001040 7007 1500
4784311500001057 7007 1500
4784311500001065 7007 2500

Required output:

Tot----Pin

5160 3 (count like how many pin numbers are present for a single TOT value. whenever TOT value changes it has to print the no of PIN values for the particular TOT value)

7007 4

please let me know if any further details required?
Back to top
View user's profile Send private message
raj12vel

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Sat Jan 10, 2009 12:09 am
Reply with quote

Hi All,

can anyone please help me on the above issue?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Sat Jan 10, 2009 12:49 am
Reply with quote

Quote:
can anyone please help me on the above issue?


no pestering, please
remember, replies are on voluntary responder's effort and time
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Jan 10, 2009 12:50 am
Reply with quote

Have you looked at the COUNT parameter in a TRAILER?
Back to top
View user's profile Send private message
raj12vel

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Sat Jan 10, 2009 1:05 am
Reply with quote

yes, I have looked it.

But here i need a count of PIN number for a particular TOT value whenever TOT value chnages.

For Ex:

TOT--------PIN

5640-------1500
5640-------1000
6569-------2000
6569-------0500

from this input file, need an output like for one TOT value '5640' we have 2 PIN number

Output:

TOT-------PIN

5640------2 (count of values exist for one TOT value)

6569------2
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Jan 10, 2009 1:11 am
Reply with quote

Quote:
But here i need a count of PIN number for a particular TOT value whenever TOT value chnages.
Isn't that what TRAILER3 is for?
Back to top
View user's profile Send private message
raj12vel

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Sat Jan 10, 2009 1:17 am
Reply with quote

I am sorry, i didnt get you...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jan 10, 2009 1:25 am
Reply with quote

Hello,

Look up TRAILER3 in the documentation. From the manual:
Quote:
TRAILER3 provides a section trailer that appears at the end of each specified section and serves as a conclusion or summary for that section
Back to top
View user's profile Send private message
raj12vel

New User


Joined: 20 Dec 2008
Posts: 43
Location: New Jersey

PostPosted: Sat Jan 10, 2009 1:36 am
Reply with quote

can you please tell me how to get the manual?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Jan 10, 2009 1:44 am
Reply with quote

Quote:
Get the manuals, it is not that difficult.....
Alissa Margulies wrote:
Unfortunately, all licensed SyncSort customers must request manuals directly from us, or download it from our website using an online support account. It is in breach of contract for an individual to share SyncSort documentation with others outside of their own company. However, please feel free to pass on my contact info to anyone who is in need of manuals and I would be happy to assist.
Regards,
Alissa
Alissa Margulies
SyncSort Mainframe Support
201.930.8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Sat Jan 10, 2009 1:56 pm
Reply with quote

Hi,

Check if this works:
Code:
//STEP001  EXEC  PGM=SYNCTOOL             
//TOOLMSG  DD SYSOUT=*                   
//DFSMSG   DD SYSOUT=*                   
//IN       DD *                           
4784311500001008 5160 1500               
4784311500001016 5160 1000               
4784311500001024 5160 1200               
4784311500001032 7007 0500               
4784311500001040 7007 1500               
4784311500001057 7007 1500               
4784311500001065 7007 2500               
//RPT DD SYSOUT=*                         
//TOOLIN   DD    *                       
OCCUR FROM(IN) LIST(RPT) NOHEADER BLANK -
  ON(18,4,CH) ON(VALCNT,U04)             
/*                                       


RPT will be your output:
Code:
5160       3 
7007       4 
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Jan 12, 2009 1:56 pm
Reply with quote

Or even this.

Code:
//STEP1   EXEC PGM=SORT                         
//SORTIN  DD *                                 
4784311500001008 5160 1500                     
4784311500001016 5160 1000                     
4784311500001024 5160 1200                     
4784311500001032 7007 0500                     
4784311500001040 7007 1500                     
4784311500001057 7007 1500                     
4784311500001065 7007 2500                     
//SYSOUT  DD SYSOUT=*                           
//SORTOUT DD SYSOUT=*                           
//SYSIN   DD *                                 
  OPTION COPY                                   
  OUTFIL REMOVECC,NODETAIL,SECTIONS=(18,4,     
         TRAILER3=(18,4,X,COUNT=(M10,LENGTH=8)))
/*


SORTOUT
Code:
5160        3
7007        4
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jan 12, 2009 2:11 pm
Reply with quote

So does this:
Code:
//TOOLIN   DD    *                         
OCCUR FROM(IN) LIST(RPT)                - 
  ON(18,4,CH) HEADER('TOT')             - 
  ON(VALCNT,U04) HEADER('PIN')             
/*                                         


Output:
Code:
TOT      PIN 
----   ----- 
5160       3 
7007       4 
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 Selecting the max value from a file. DFSORT/ICETOOL 3
No new posts Change history of vsam file. JCL & VSAM 3
No new posts Count the number of characters in a f... CA Products 1
No new posts Split large FB file based on Key coun... DFSORT/ICETOOL 4
No new posts EMPTY file check scenario JCL & VSAM 6
Search our Forums:

Back to Top