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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Any utility with which we can do this, DONT write COBOL pgm
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 15, 2009 12:34 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2275
Location: @my desk

PostPosted: Thu Jan 15, 2009 4:29 pm    Post subject:
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    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 DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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