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
 

 

Have to do this using syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
bharathrudra

New User


Joined: 31 Mar 2010
Posts: 3
Location: Hyderabad

PostPosted: Wed Mar 31, 2010 1:36 pm    Post subject: Have to do this using syncsort
Reply with quote

Hi i am having the records in this format:
Input:
HD1
1.....100
1.....150
1.....100
2.....200
2.....300
3.....300
TR1
HD2
4.....100
5.....100
6.....100
TR2

Expected output

HD1
1.....350
1.....150
1.....100
2.....200
2.....300
3.....300
TR1
HD2
4.....100
5.....100
6.....100
TR2

i have to do this using syncsort. Is there any solution?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Mar 31, 2010 1:47 pm    Post subject: Reply to: syncsort
Reply with quote

Quote:
Is there any solution?
not until You explain the logic to transform
Code:
1.....100
1.....150
1.....100

into
Code:
1.....350
1.....150
1.....100
Back to top
View user's profile Send private message
bharathrudra

New User


Joined: 31 Mar 2010
Posts: 3
Location: Hyderabad

PostPosted: Wed Mar 31, 2010 2:19 pm    Post subject: syncsort
Reply with quote

summing up the fileds, while summing up we need to take care of the header and trailer as we will be having spaces at the position mentioned in the detail records
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Mar 31, 2010 2:49 pm    Post subject: Reply to: syncsort
Reply with quote

Your explanation would be true for something along ...

Code:
Input:
HD1
1.....100
1.....150
1.....100
2.....200
2.....300
3.....300
TR1
HD2
4.....100
5.....100
6.....100
TR2

output :

HD1
1.....350
2.....500
3.....300
TR1
HD2
4.....100
5.....100
6.....100
TR2


we still need a better explanation !
Back to top
View user's profile Send private message
bharathrudra

New User


Joined: 31 Mar 2010
Posts: 3
Location: Hyderabad

PostPosted: Wed Mar 31, 2010 3:01 pm    Post subject: syncsort
Reply with quote

i hope that was the requirement. What i first gave is the requirement. let me it is possible. If the solution is in two different stpes also that should be fine.
Is joinkeys of any help here?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Mar 31, 2010 3:09 pm    Post subject: Reply to: syncsort
Reply with quote

Quote:
i hope that was the requirement


IT is not based on hopes, but on facts

until You are sure of the requirements and are able to express them clearly
we are just wasting time

also guessing about what <sort> function to use is a bit premature in such a foggy situation
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Mar 31, 2010 3:28 pm    Post subject:
Reply with quote

Unfortunately what you want is only known to yourself and no other.

I have tried to work out the logic for getting from input to output and can see none that works for me.

Please read some other sort topics and see what other information will be asked for before posting.

1) RECFM & LRECL of the input dataset
2) Position, length and format of key fields.
3) Samples of input and output.
4) Logic for getting from input to output.

Unless you post this vital information I am afraid that your search for help ends with your inability to post required data.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Wed Mar 31, 2010 4:03 pm    Post subject:
Reply with quote

Well, I hope you could spot the difference in what Enrico has posted compared to what you post. Enrico showed:
Quote:
HD1
1.....350
2.....500
3.....300
TR1
which looks logical while your first post shows the output as:
Quote:
HD1
1.....350
1.....150
1.....100

2.....200
2.....300
3.....300
TR1
Both the expected outputs are totally different and characters in blue looks un-necessary for the output - but following the Enrico post you say - "i hope that was the requirement" ... icon_rolleyes.gif
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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


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