MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compare files
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Nov 17, 2005 12:32 pm    Post subject: Reply with quote

Shuko,

I believe I worked it out. The DFSORT job below will do what you want based on my understanding of your rules. What I did was join each pair of records with matching ADFLAG and ADJID fields together so I could use IFTHEN logic on the fields in each pair of records.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file (FB/5000)
//IN2 DD DSN=...  input file (FB/5000)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/5000)
//TOOLIN DD *
   COPY FROM(IN1) TO(T1) USING(CTL1)
   COPY FROM(IN2) TO(T1) USING(CTL2)
   SPLICE FROM(T1) TO(OUT) ON(231,32,CH) ON(957,32,CH) -
   WITH(5001,5000) KEEPNODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  OUTREC FIELDS=(1,8,SFF,TO=FS,LENGTH=8,9,4992,10000:X)
/*
//CTL2CNTL DD *
  OUTREC FIELDS=(231:231,23,957:957,32,
    5001:1,8,SFF,TO=FS,LENGTH=8,9,4992)
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,IFOUTLEN=5000,
   IFTHEN=(WHEN=(6947,32,CH,EQ,C'SETTLED',AND,1,8,FS,EQ,5001,8,FS),
      BUILD=(1:5001,8,FS,EDIT=(SIIIT.TT),SIGNS=(,-),5009,4992)),
   IFTHEN=(WHEN=(6947,32,CH,EQ,C'SETTLED',AND,1,8,FS,NE,5001,8,FS),
      BUILD=(1:1,8,FS,MUL,-1,EDIT=(SIIIT.TT),SIGNS=(,-),9,4992,/,
             1:5001,8,FS,EDIT=(SIIIT.TT),SIGNS=(,-),5009,4992,/,
             1:5001,8,FS,EDIT=(SIIIT.TT),SIGNS=(,-),5009,1938,
               C'BOOKED',1979:6979,3022)),
   IFTHEN=(WHEN=(5001,8,CH,EQ,C' '),
      BUILD=(1:1,8,FS,MUL,-1,EDIT=(SIIIT.TT),SIGNS=(,-),9,4992)),
   IFTHEN=(WHEN=(1,8,CH,EQ,C' '),
      BUILD=(1:5001,8,FS,EDIT=(SIIIT.TT),SIGNS=(,-),5009,4992)),
   IFTHEN=(WHEN=NONE,
      BUILD=(1:1,8,FS,MUL,-1,EDIT=(SIIIT.TT),SIGNS=(,-),9,4992,/,
             1:5001,8,FS,EDIT=(SIIIT.TT),SIGNS=(,-),5009,4992))
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort


Last edited by Frank Yaeger on Fri Nov 18, 2005 10:46 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shuko
Beginner


Joined: 08 Nov 2005
Posts: 73
Topics: 20

PostPosted: Fri Nov 18, 2005 1:51 am    Post subject: Reply with quote

Perfect Frank. Thank you very much for your precious time and also for your patience. Amazing, how you can come up, such a great solution in such a short time. We have lot's to learn from the Master.
Very Happy
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Nov 18, 2005 10:44 am    Post subject: Reply with quote

Glad I could help.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group