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 FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


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