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

Have to do this using syncsort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 31, 2010 1:47 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 31, 2010 2:49 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 31, 2010 3:09 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Mar 31, 2010 3:28 pm
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

Superior Member


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

PostPosted: Wed Mar 31, 2010 4:03 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top