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

Dataset Comparison


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
VivekKhanna

New User


Joined: 09 Feb 2009
Posts: 57
Location: India

PostPosted: Sun Jul 04, 2010 1:42 pm
Reply with quote

Hi,

I am facing some problem in comparing two datasets (PS) and getting the results in third (new) dataset.

Key information will start from Column 3 and will be 9 chars long.

Dataset 1: (FB, LRECL=402)

Code:

----+---10----+---20----+---30----+---40----+---50----+---60----+---70----
D 111111111232365542255...................................................................
D 111111112325647451325...................................................................
D 111111113568145452323...................................................................
D 111111114654673324SFV..................................................................


Dataset 2: (FB, LRECL=402)

Code:

----+---10----+---20----+---30----+---40----+---50----+---60----+---70----
D 111111111232365542255...................................................................
D 111111113568145452323...................................................................
D 1111111173524GHJ32443..................................................................


The problem is that I need to compare both the datasets and the result should be stored in the third (new) dataset. The output dataset should contain all the records from Dataset 1 & Dataset 2 and matching records should be marked with indicator 'P' at in the second column. The output should be:

Code:

----+---10----+---20----+---30----+---40----+---50----+---60----+---70----
DP111111111232365542255..................................................................
D 111111112325647451325...................................................................
DP111111113568145452323..................................................................
D 111111114654673324SFV..................................................................
D 1111111173524GHJ32443..................................................................
Back to top
View user's profile Send private message
VivekKhanna

New User


Joined: 09 Feb 2009
Posts: 57
Location: India

PostPosted: Mon Jul 05, 2010 12:45 pm
Reply with quote

A small mistake, I need all the records for Dataset 1, but no records from Dataset 2 in the output dataset.
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: Wed Jul 07, 2010 1:19 am
Reply with quote

Since you changed the "rules" from your first post where you showed the expected output to your second post where you didn't, it's difficult to know what you really want.

Please start over and show a better example of the records in each input file and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.

Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN    DD    *
    OPTION COPY
/*
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top