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
 

 

Need help to develop sort card or easytrive:

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

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Feb 04, 2013 4:15 pm    Post subject: Need help to develop sort card or easytrive:
Reply with quote

Hi,

I have file1 having diffent fields in below format:
Plastic no. , IA cd, Country cd , ZIP , Currency cd, Fees, Currency fees

the data in these fileds is been repeated for same plastic no. 2 times

And file 2 having fileds as plastic no. ,country cd,currency cd and currency fees for each plastic no. repeated 2 times for two different countries.


I need to put data from file2 to file1 for each plastic no. present in file1 for the fields Country cd, currency cd and currency fees.

Can i achive these using easytrive or sort card.
Please educate me on these.
Back to top
View user's profile Send private message

chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Mon Feb 04, 2013 4:26 pm    Post subject:
Reply with quote

Hi,

What you have tries so far?

Check for Sort Join keys. Your requirement seems to be easily doable with JOINKEYS

Regards,
Chandan
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Feb 04, 2013 4:33 pm    Post subject:
Reply with quote

Hi Vidya,

You could explain your requirement in simpler and better by posting the sameple records of
file1 and file2 and just post the needed output file quoting the keys

Ofcourse,while doing so please do it within code tags
Back to top
View user's profile Send private message
Vidya Kajale

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Feb 04, 2013 4:34 pm    Post subject:
Reply with quote

Hi,

If i need to repeate it 200 times in the same file for same platic no. for 200 different countries shall i write sort join 200 times for each country code.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Feb 04, 2013 4:42 pm    Post subject: Reply to: Need help to develop sort card or easytrive:
Reply with quote

1) tell us what sort product You are using ...
( ICE .... IBM DFSORT, WER... SYNCSORT )

2) please refrain from using local jargon and filed names

we take the trouble of understanding Your problem...
please spare us the trouble of decrypting Your organization jargon icon_cool.gif

post ( as usual for <sort> requests ... )

recfm/lrecl of the input/output file

position/length/format of the fields of interest ( no cobol jargon please )

clear description of the process

sample of the input file[s]

example of the outputs expected
Back to top
View user's profile Send private message
Vidya Kajale

New User


Joined: 01 Jun 2010
Posts: 43
Location: India

PostPosted: Mon Feb 04, 2013 5:00 pm    Post subject:
Reply with quote

Hi,
We are using sort product as SYNCSORT.
file1:
Code:
123456   ZA             123.00                    981         
123456   ZA             123.00                    981         
123456   ZA             123.00                    981         
123455   ZP             123.00                    981         
123455   ZP             123.00                    981         
123455   ZP             123.00                    981         
123454   ZE             123.00                    981         
123454   ZE             123.00                    981         
123454   ZE             123.00                    981         

file 2:
Code:
123456   UK  001 862 
123456   UK  001 862 
123456   UK  001 862 
123455   US  002 861 
123455   US  002 861 
123455   US  002 861 
123454   AF  003 860 
123454   AF  003 860 
123454   AF  003 860 

expected o/p:

Code:
123456   ZA   UK  001   123.00  862               981       
123456   ZA   UK  001   123.00  862               981       
123456   ZA   UK  001   123.00  862               981       
123455   ZP   US  002   123.00  861               981       
123455   ZP   US  002   123.00  861               981       
123455   ZP   US  002   123.00  861               981       
123454   ZE   AF  003   123.00  860               981       
123454   ZE   AF  003   123.00  860               981       
123454   ZE   AF  003   123.00  860               981



Input file1 of 958 bytes FB.
file2: 800 bytes FB.
o/p of 958 bytes FB.

Your data was CODE' d for readability
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Mon Feb 04, 2013 5:43 pm    Post subject: Reply to: Need help to develop sort card or easytrive:
Reply with quote

Which version of SyncSort?

Do you have support for JNFnCNTL files for JOINKEYS?
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Feb 04, 2013 6:04 pm    Post subject:
Reply with quote

Bill,

From the input and output

I dont think TS needs to use JNFnCNTL
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Feb 04, 2013 6:08 pm    Post subject: Reply to: Need help to develop sort card or easytrive:
Reply with quote

I am not a <sort> expert ...
but the logic tells me that the <TS> will have to add a sequence number to each entry in each group in order to match in strict sequence
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Feb 04, 2013 6:31 pm    Post subject:
Reply with quote

Enrico,

The <TS> needs to join based on Plastic no. and consider the file is sorted so he gets the output as is.(If I understand <TS> correctly)
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Feb 04, 2013 6:34 pm    Post subject: Reply to: Need help to develop sort card or easytrive:
Reply with quote

NOPE icon_wink.gif

each <plastic> contains three entries and even if the TS posted irrelevant info
I would assume ( to be on the safe side ) 1<>1 2<>2 3<>3
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Feb 04, 2013 6:45 pm    Post subject:
Reply with quote

Ah I was so dumb on that .. I missed out a cartesian product

Thanks for the clarification Enrico

Apologies Bill icon_redface.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Mon Feb 04, 2013 6:45 pm    Post subject: Reply to: Need help to develop sort card or easytrive:
Reply with quote

The key is a six digit number. There are three on each file. Which will get you nine joins per key. If one file has duplicates removed (information is duplicated, so should not be a problem) then it will make processing more straighforward. Even de-dupe both, if possible, and output three records per match at the end.
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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