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

Any utility with which we can do this, DONT write COBOL pgm


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

New User


Joined: 28 Dec 2005
Posts: 1

PostPosted: Thu Jan 15, 2009 12:24 pm
Reply with quote

I have two sequential files, FILE-1 and FILE-2.
FILE-1 contains 2 columns(A,B) and FILE-2 contains 3 columns
(C,D,E).I want an output file, FILE-3 which has all five
columns with duplicates eliminated from column A.

Let me know if need more details...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jan 15, 2009 12:34 pm
Reply with quote

More details needed.......

Did you search before posting ? because this is a very common topic in both the JCL and DFSORT forums.

LRECL & RECFM for both files.

Do both files have the exact same number of records to perform a 1 to 1 merge, if not what happens in this case.

Do the duplicates get removed from column 1 before or after the two files are merged as this may affect the number of records in file 1
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Jan 15, 2009 4:10 pm
Reply with quote

USE sort utility............ hope below explanation helps....
1. SORT FIELDS=COPY

It is for copy records to output file

2. INREC FIELDS=(7:2,5,20:10,3) (for formatting)

Here we have two formattings,

1. 7:2,5 - data at 2nd position of input file with length 5
copied to 7th position of output file

2. 20:10,3 - data at 10th position of input file with length 3
copied to 20th position of output file

........for eliminating duplicates, use ....
SUM FIELDS=NONE,XSUM
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Jan 15, 2009 4:14 pm
Reply with quote

expat, let me know if this works out assuming, lrecl, recfm and the number of records are same in two files.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Jan 15, 2009 4:29 pm
Reply with quote

Mukesh,

Unless the OP responds to the questions asked here, we cannot offer suggestions as he might know what is his requirement and not any of us.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top