Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us