Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
OUTREC should be one col from file1 & another from file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: OUTREC should be one col from file1 & another from file
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 Moderator


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

PostPosted: Tue May 10, 2005 8:45 pm    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Tue May 10, 2005 9:49 pm    Post subject: Re: our rec should be one col from file1 & another from
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 Moderator


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

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

Priyesh,

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

http://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:

http://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:

http://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    Post subject: Re: OUTREC should be one col from file1 & another from f
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    Post subject: Re: OUTREC should be one col from file1 & another from f
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    Post subject:
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    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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us