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

Need help to develop sort card or easytrive:


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

PostPosted: Mon Feb 04, 2013 4:26 pm
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

Global Moderator


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

PostPosted: Mon Feb 04, 2013 4:33 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Feb 04, 2013 4:42 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Feb 04, 2013 5:43 pm
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

Global Moderator


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

PostPosted: Mon Feb 04, 2013 6:04 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Feb 04, 2013 6:08 pm
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

Global Moderator


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

PostPosted: Mon Feb 04, 2013 6:31 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon Feb 04, 2013 6:34 pm
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

Global Moderator


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

PostPosted: Mon Feb 04, 2013 6:45 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Feb 04, 2013 6:45 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top