Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT Count from the input file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SYNCSORT Count from the input file
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Sat Jan 10, 2009 12:49 am    Post subject: Reply to: SYNCSORT Count from the input file
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: 2150
Location: At my coffee table

PostPosted: Sat Jan 10, 2009 12:50 am    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sat Jan 10, 2009 1:11 am    Post subject:
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    Post subject:
Reply with quote

I am sorry, i didnt get you...
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: Sat Jan 10, 2009 1:25 am    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sat Jan 10, 2009 1:44 am    Post subject:
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

Senior Member


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

PostPosted: Sat Jan 10, 2009 1:56 pm    Post subject:
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: 2284
Location: @my desk

PostPosted: Mon Jan 12, 2009 1:56 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Jan 12, 2009 2:11 pm    Post subject: Reply to: SYNCSORT Count from the input file
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    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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us