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
 

 

Dataset Comparison

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Dataset Comparison
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    Post subject:
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 Moderator


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

PostPosted: Wed Jul 07, 2010 1:19 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm


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