So this is what I have:

01  CCMASTR-OLD.                 
    05  COMPARE-1 PIC X(159).
    05  IGNORE-1  PIC X(5).  
    05  COMPARE-2 PIC X(222).

01  CCMASTR-NEW.                 
    05  COMPARE-1 PIC X(159).
    05  IGNORE-1  PIC X(5).  
    05  COMPARE-2 PIC X(222).
    05  IGNORE-NEW PIC X(17).

$$FILEM TCNEW=DVFJS.OLD.COPY(CCMASTR),
$$FILEM TCNEW=DVFJS.NEW.COPY(CCMASTR),
$$FILEM FIELDOLD=(COMPARE-1,COMPARE-2), 
$$FILEM FIELDNEW=(COMPARE-1,COMPARE-2), 

This works fine, but it would have been simpler if I could have used the actual 
copybook and told FM which fields to ignore, rather than which fields to 
utilize.  Did I miss some option for this?  Something like this (assuming the 
copybook above):

$$FILEM IGNOREOLD=(IGNORE-1), 
$$FILEM IGNORENEW=(IGNORE-1,IGNORE-NEW), 

Frank

> Date: Tue, 30 Jun 2015 13:05:28 -0700
> From: [email protected]
> Subject: Re: FILEM DSM compare question
> To: [email protected]
> 
> Frank,
> 
> Here is sample File Manager JCL which will compare the 2 vsam files. The 
> old vsam in my case had an lrecl of 612 and the new vsam had an lrecl of 
> 615. 
> 
> You need to use templates to compare datasets with 2 different lrecl. so 
> create a pds members(see below for samples) with the mapping of the fields 
> you want to compare. I had a cobol copybook which I used.
> 
> //STEP0100 EXEC PGM=FILEMGR 
> //SYSPRINT DD SYSOUT=* 
> //DDOLD    DD DISP=SHR,DSN=Your Old VSAM Cluster 
> //DDNEW    DD DISP=SHR,DSN=Your New VSAM Cluster
> //SYSIN    DD * 
> $$FILEM DSM TYPE=FORMATTED, 
> $$FILEM     SYNCH=ONETOONE, 
> $$FILEM     MAP=MAPPED, 
> $$FILEM     TCOLD=FRANK.PDS.MAP(SWA1), 
> $$FILEM     TCNEW=FRANK.PDS.MAP(SWA2), 
> $$FILEM     FIELDOLD=OLD-REC, 
> $$FILEM     FIELDNEW=NEW-REC, 
> $$FILEM     LIST=LONG, 
> $$FILEM     EXCLUDE=MATCHED, 
> $$FILEM     WIDE=YES, 
> $$FILEM     HILIGHT=YES 
> //*
> 
> The contents of FRANK.PDS.MAP(SWA1)
> 
> ----+----1----+----2----+----3----+----4----+-
>         01 DATA-REC. 
>            05 OLD-REC           PIC X(612). 
> 
> 
> The contents of FRANK.PDS.MAP(SWA2)
> 
> ----+----1----+----2----+----3----+----4----+----5
>         01 DATA-REC. 
>            05 NEW-REC           PIC X(612). 
>            05 NEW-FLD           PIC X(003). 
> 
> and Just for the record, DFSORT job to do the same comparison and much 
> more efficient than File manager job.
> 
> //STEP0100 EXEC PGM=SORT 
> //SYSOUT   DD SYSOUT=*
> //INA      DD DISP=SHR,DSN=Your Old VSAM Cluster 
> //INB      DD DISP=SHR,DSN=Your New VSAM Cluster
> //SORTOUT  DD SYSOUT=* 
> //SYSIN    DD * 
>   OPTION COPY 
>   JOINKEYS F1=INA,FIELDS=(1,612,A),TYPE=F 
>   JOINKEYS F2=INB,FIELDS=(1,612,A),TYPE=F 
>   REFORMAT FIELDS=(F1:1,612,?,F2:1,612) 
>   JOIN UNPAIRED 
>   OMIT COND=(613,1,CH,EQ,C'B') 
>   INREC IFOUTLEN=620, 
>   IFTHEN=(WHEN=(613,1,CH,EQ,C'1'),BUILD=(C'OLD-REC ',001,612)),
>   IFTHEN=(WHEN=(613,1,CH,EQ,C'2'),BUILD=(C'NEW-REC ',614,612)) 
> //*
> 
> 
> Hope this helps...
> Kolusu
> 
> 
> 
> From:   Frank Swarbrick <[email protected]>
> To:     [email protected]
> Date:   06/30/2015 10:08 AM
> Subject:        Re: FILEM DSM compare question
> Sent by:        IBM Mainframe Discussion List <[email protected]>
> 
> 
> 
> I'm not copying anything.  I am trying to compare two files, where one is 
> the old version of the file and one is the new version, with
> 
> Take the following two examples
> OLD: (0012)1234AAAABBBB 
> NEW: (0016)1234AAAABBBB____
> OLD: (0012)1235AAAABBBB 
> NEW: (0016)1235AAAABBBBABCD
> 
> 
> The numbers in parenthesis are the lengths of the records and are not part 
> of the record.  The underscores represents blank spaces.  The first four 
> bytes of each record is the key.
> 
> I want to do a compare so that for record 1234 they would be considered to 
> be equal, but record 1235 would be considered changed.
> 
> > Date: Tue, 30 Jun 2015 01:03:21 -0500
> > From: [email protected]
> > Subject: Re: FILEM DSM compare question
> > To: [email protected]
> > 
> > Frank Swarbrick wrote:
> > 
> > >I know we have some DFSORT experts here.  I'm hoping we also have some 
> File Manager experts.
> > 
> > I know DFSORT and ICETOOL, but like you I also ask questions on IBM-MAIN 
> too ;-),  but I don't know File Manager...
> > 
> > >I have a KSDS where I am adding a new field, and thus increasing the 
> length of each record.  I want to do a compare but only show the field as 
> being "not equal" if the newly added characters are not spaces.  But I do 
> want to show them as being not equal if the newly added characters are 
> other than spaces.
> > 
> > Ok, lets see - you added some characters (not spaces) to new column x-y 
> using some utility. 
> > 
> > Do you want to search all 'short' and 'long' records? Or do you copy 
> only 'long' records and then search them only?
> > 
> > Something like this INCLUDE=(<first column>,<how many 
> characters>,CH,NE,C' ') ?
> > 
> > Or something like this - one possible way to split up your records in 
> two separate outputs?
> > 
> > (for this example, your new field is starting at column 100 and is 10 
> chars long, no variations in position and length)
> > 
> > OUTFILE FNAMES=SPACES,INCLUDE=(100,10,CH,EQ,C' ') 
> > OUTFILE FNAMES=NOSPACE,INCLUDE=(100,10,1,CH,NE,C' ') 
> > 
> > Or do you want to show if a space is appearing at all? In other words, 
> do you want to pick up a record with at least one space character in your 
> new field? If so, the SS statement is a great help for that.
> > 
> > Or am I missing something?
> > 
> > Groete / Greetings
> > Elardus Engelbrecht
> > 
> > ----------------------------------------------------------------------
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email to [email protected] with the message: INFO IBM-MAIN
>   
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 
> 
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
                                          
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to