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

How to write the remaing records into second data set


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

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Fri Nov 19, 2004 8:48 pm
Reply with quote

Hi,

could any one please tell me how to write the records from first dataset to second data set which is not having the remaining records when we comapare the two datesets.

Thanks in advance

Naveen
Back to top
View user's profile Send private message
naveen_amudalapelly
Warnings : 1

New User


Joined: 15 Oct 2004
Posts: 16

PostPosted: Mon Nov 22, 2004 1:05 pm
Reply with quote

hi

Till now i didnt get any ans since 3 days

Is ibmmainframe experts forum is working?

icon_sad.gif
Back to top
View user's profile Send private message
lramani

New User


Joined: 03 Nov 2004
Posts: 21
Location: NOIDA, India

PostPosted: Wed Nov 24, 2004 9:43 am
Reply with quote

Hi Naveen,
Can u please put more clarity on what u want.....

Is it like u have two files A & B.
There is some mismatch between the two files....for example

File A has records
123456
abcdef
qwerty
987654

File B has records
123456
abcdef
987654

You want to write the qwerty record to file B. Is this your requirement??

If this is ur requirement ..what surprises me is...if file B has to be same as file A. Then just use COMPAREX to check if the two files are matching. If they are not directly use the file A. I hope u r getting what I mean...

If this not your requirement then can u please be more specific. May be the forum will reply to ur query.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Thu Nov 25, 2004 9:49 pm
Reply with quote

naveen_amudalapelly wrote:
Hi,

could any one please tell me how to write the records from first dataset to second data set which is not having the remaining records when we comapare the two datesets.

Thanks in advance

Naveen


Please frame your question clearly. otherwise state some examples.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Thu Nov 25, 2004 9:54 pm
Reply with quote

naveen_amudalapelly wrote:
Hi,

could any one please tell me how to write the records from first dataset to second data set which is not having the remaining records when we comapare the two datesets.

Thanks in advance

Naveen


Use this cobol logic which will sovle the problem

EVALUATE TRUE

WHEN KEY-FILE1 < KEY-FILE2
KEY-FILE1 not present in FILE 2, Do what ever you want
WHEN KEY-FILE2 < KEY-FILE1
KEY-FILE2 not present in FILE1, DO what ever
WHEN KEY-FILE1 = KEY-FILE2
This record is present in both the files.
END-EVAluate.


There are solutions using SORT, but your question is not clear. however use above logic it will give the solution.
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top