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

OUTREC should be one col from file1 & another from file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
advith001

New User


Joined: 16 Mar 2005
Posts: 23

PostPosted: Tue May 10, 2005 3:44 pm
Reply with quote

I required to write the output record having 2 columns, one from first file say file1 and another from second file file2 by using JCL. not COBOL code.


file1 having fldA fldB fldC
file2 having fldD fldE

outfile should have fldB and fldE

Please help me on this request.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue May 10, 2005 8:45 pm
Reply with quote

You need to give more detail. What is the RECFM and LRECL of each input file? Does each input file have only one record or many records? If many records, then do you want to "join" the fields from record 1 of file1 with record 1 of file2, record 2 of file1 with record 2 of file2, etc, or do you want to "join" the fields on a common key? What is the position, length of format of each relevent field?

Showing an example of records with actual values for input file1 and input file2 and what you want the output records to look like would help clarify what you need.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Tue May 10, 2005 9:49 pm
Reply with quote

Check out below link....& go to the bottom of the page for the heading Join fields from two files record-by-record

http://www-1.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html

It seems almost same, what your query is for...

Regards,

Priyesh
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue May 10, 2005 10:26 pm
Reply with quote

Priyesh,

The correct URL for that Smart DFSORT Trick for "Join fields from two files record-by-record" is:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html#t01

The URL for the Smart DFSORT Trick "Join fields from two files on a key" is:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst02.html#t3a

One of these tricks may indeed be what the poster needs, but more information would tell us for sure.

BTW, the URL for the complete list of Smart DFSORT Tricks is:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/index.html
Back to top
View user's profile Send private message
advith001

New User


Joined: 16 Mar 2005
Posts: 23

PostPosted: Wed May 11, 2005 11:24 am
Reply with quote

Dear all,

thankx i got solution for my requirement.
I apologize for the confusion.

My requrement is

FILE1
FLDA1 FLDA2 FLDA3
101 NameA1 LOCA1
102 NameA2 LOCA2
103 NameA3 LOCA3
104 NameA4 LOCA4
105 NameA5 LOCA1
106 NameA6 LOCA2
107 NameA7 LOCA3
108 NameA8 LOCA4


FILE2
FLDB1 FLDB2
102 NameA2
103 NameA3
105 NameA5
107 NameA7
109 NameA9

OUTFILE
FLDO1 FLDO2
102 NameA2
103 NameA3
105 NameA5
107 NameA7


Thanks,
Anna.
Back to top
View user's profile Send private message
ssowjanya

New User


Joined: 29 Apr 2005
Posts: 13

PostPosted: Wed May 11, 2005 2:58 pm
Reply with quote

Hi Advith,
Can u explain how u solved ur problem.
thank u
Back to top
View user's profile Send private message
asridhar

New User


Joined: 04 May 2005
Posts: 5
Location: Hyderabad

PostPosted: Wed May 11, 2005 4:36 pm
Reply with quote

can you explain whats the complete jcl for this one
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 Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top