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
 

 

compare 2 records in seq. file & report differences
Goto page 1, 2  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dr.ostman

New User


Joined: 28 Oct 2005
Posts: 4

PostPosted: Thu Jan 31, 2008 5:47 pm    Post subject: compare 2 records in seq. file & report differences
Reply with quote

Hello,

i'd like to compare two records from a sequential (FB) dataset and i want to get an output dataset that contains both records if they are not equal.
so far it is not very difficult, but i'd like to have markers in that output dataset in a third line that show where the differences are.

e.g.:

input DS:
Code:

RECORD01INCLUDESSOMETHINGY
RECORD02INCLUDES  NOTHINGX


ouput DS:
Code:

RECORD01INCLUDESSOMETHINGY
       |        |+++     |
RECORD02INCLUDES  NOTHINGX



Do you know if this is possible with DFSORT or ICETOOL ?

thanks a lot in advance

dr.
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Jan 31, 2008 10:29 pm    Post subject: Reply to: compare 2 records in seq. file & report differ
Reply with quote

Dr.ostman,

The following DFSORT/ICETOOL JCL will give you the desired results. I assumed that your input is FB and 80 bytes long
Code:

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN       DD *
RECORD01INCLUDESSOMETHINGY
RECORD02INCLUDES  NOTHINGX
//T1       DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//OUT      DD SYSOUT=*
//TOOLIN   DD *
  SPLICE FROM(IN) TO(T1) WITHEACH  ON(161,08,CH) -
    WITH(081,80) KEEPNODUPS USING(CTL1)
  COPY FROM(T1) TO(OUT) USING(CTL2)
//CTL1CNTL DD *
 INREC IFTHEN=(WHEN=INIT,
      OVERLAY=(161:SEQNUM,8,ZD,START=2,INCR=1,
               169:161,8,ZD,MOD,+2,TO=ZD,LENGTH=1)),
    IFTHEN=(WHEN=(169,1,ZD,EQ,01),
     BUILD=(081:01,80,161:161,8,ZD,SUB,169,1,ZD,M11,LENGTH=8))

 OUTFIL FNAMES=T1,
 IFTHEN=(WHEN=INIT,OVERLAY=(161:80X)),
 IFTHEN=(WHEN=(001,1,CH,NE,081,1,CH),OVERLAY=(161:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(002,1,CH,NE,082,1,CH),OVERLAY=(162:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(003,1,CH,NE,083,1,CH),OVERLAY=(163:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(004,1,CH,NE,084,1,CH),OVERLAY=(164:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(005,1,CH,NE,085,1,CH),OVERLAY=(165:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(006,1,CH,NE,086,1,CH),OVERLAY=(166:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(007,1,CH,NE,087,1,CH),OVERLAY=(167:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(008,1,CH,NE,088,1,CH),OVERLAY=(168:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(009,1,CH,NE,089,1,CH),OVERLAY=(169:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(010,1,CH,NE,090,1,CH),OVERLAY=(170:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(011,1,CH,NE,091,1,CH),OVERLAY=(171:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(012,1,CH,NE,092,1,CH),OVERLAY=(172:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(013,1,CH,NE,093,1,CH),OVERLAY=(173:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(014,1,CH,NE,094,1,CH),OVERLAY=(174:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(015,1,CH,NE,095,1,CH),OVERLAY=(175:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(016,1,CH,NE,096,1,CH),OVERLAY=(176:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(017,1,CH,NE,097,1,CH),OVERLAY=(177:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(018,1,CH,NE,098,1,CH),OVERLAY=(178:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(019,1,CH,NE,099,1,CH),OVERLAY=(179:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(020,1,CH,NE,100,1,CH),OVERLAY=(180:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(021,1,CH,NE,101,1,CH),OVERLAY=(181:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(022,1,CH,NE,102,1,CH),OVERLAY=(182:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(023,1,CH,NE,103,1,CH),OVERLAY=(183:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(024,1,CH,NE,104,1,CH),OVERLAY=(184:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(025,1,CH,NE,105,1,CH),OVERLAY=(185:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(026,1,CH,NE,106,1,CH),OVERLAY=(186:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(027,1,CH,NE,107,1,CH),OVERLAY=(187:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(028,1,CH,NE,108,1,CH),OVERLAY=(188:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(029,1,CH,NE,109,1,CH),OVERLAY=(189:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(030,1,CH,NE,110,1,CH),OVERLAY=(190:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(031,1,CH,NE,111,1,CH),OVERLAY=(191:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(032,1,CH,NE,112,1,CH),OVERLAY=(192:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(033,1,CH,NE,113,1,CH),OVERLAY=(193:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(034,1,CH,NE,114,1,CH),OVERLAY=(194:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(035,1,CH,NE,115,1,CH),OVERLAY=(195:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(036,1,CH,NE,116,1,CH),OVERLAY=(196:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(037,1,CH,NE,117,1,CH),OVERLAY=(197:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(038,1,CH,NE,118,1,CH),OVERLAY=(198:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(039,1,CH,NE,119,1,CH),OVERLAY=(199:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(040,1,CH,NE,120,1,CH),OVERLAY=(200:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(041,1,CH,NE,121,1,CH),OVERLAY=(201:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(042,1,CH,NE,122,1,CH),OVERLAY=(202:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(043,1,CH,NE,123,1,CH),OVERLAY=(203:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(044,1,CH,NE,124,1,CH),OVERLAY=(204:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(045,1,CH,NE,125,1,CH),OVERLAY=(205:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(046,1,CH,NE,126,1,CH),OVERLAY=(206:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(047,1,CH,NE,127,1,CH),OVERLAY=(207:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(048,1,CH,NE,128,1,CH),OVERLAY=(208:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(049,1,CH,NE,129,1,CH),OVERLAY=(209:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(050,1,CH,NE,130,1,CH),OVERLAY=(210:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(051,1,CH,NE,131,1,CH),OVERLAY=(211:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(052,1,CH,NE,132,1,CH),OVERLAY=(212:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(053,1,CH,NE,133,1,CH),OVERLAY=(213:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(054,1,CH,NE,134,1,CH),OVERLAY=(214:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(055,1,CH,NE,135,1,CH),OVERLAY=(215:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(056,1,CH,NE,136,1,CH),OVERLAY=(216:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(057,1,CH,NE,137,1,CH),OVERLAY=(217:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(058,1,CH,NE,138,1,CH),OVERLAY=(218:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(059,1,CH,NE,139,1,CH),OVERLAY=(219:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(060,1,CH,NE,140,1,CH),OVERLAY=(220:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(061,1,CH,NE,141,1,CH),OVERLAY=(221:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(062,1,CH,NE,142,1,CH),OVERLAY=(222:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(063,1,CH,NE,143,1,CH),OVERLAY=(223:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(064,1,CH,NE,144,1,CH),OVERLAY=(224:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(065,1,CH,NE,145,1,CH),OVERLAY=(225:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(066,1,CH,NE,146,1,CH),OVERLAY=(226:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(067,1,CH,NE,147,1,CH),OVERLAY=(227:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(068,1,CH,NE,148,1,CH),OVERLAY=(228:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(069,1,CH,NE,149,1,CH),OVERLAY=(229:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(070,1,CH,NE,150,1,CH),OVERLAY=(230:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(071,1,CH,NE,151,1,CH),OVERLAY=(231:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(072,1,CH,NE,152,1,CH),OVERLAY=(232:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(073,1,CH,NE,153,1,CH),OVERLAY=(233:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(074,1,CH,NE,154,1,CH),OVERLAY=(234:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(075,1,CH,NE,155,1,CH),OVERLAY=(235:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(076,1,CH,NE,156,1,CH),OVERLAY=(236:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(077,1,CH,NE,157,1,CH),OVERLAY=(237:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(078,1,CH,NE,158,1,CH),OVERLAY=(238:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(079,1,CH,NE,159,1,CH),OVERLAY=(239:C'+'),HIT=NEXT),
 IFTHEN=(WHEN=(080,1,CH,NE,160,1,CH),OVERLAY=(240:C'+'))
//CTL2CNTL DD *
 OUTFIL FNAMES=OUT,IFOUTLEN=80,
 IFTHEN=(WHEN=(161,80,CH,EQ,C' '),BUILD=(01,80,/,081,80)),
 IFTHEN=(WHEN=NONE,BUILD=(01,80,/,161,80,/,081,80))
/*
Back to top
View user's profile Send private message
dr.ostman

New User


Joined: 28 Oct 2005
Posts: 4

PostPosted: Tue Feb 05, 2008 9:02 pm    Post subject: Reply to: compare 2 records in seq. file & report differ
Reply with quote

first i want to say thanks to Skolusu !

i have tested this sample and it worked fine...

but this is too much work if i need that for several files with different LRECLs.

now i meditated a long time over the DFSORT Application programming guide looking for a way to use different LRECLs without defining a ITHEN-statement for each byte, but i could not find a way...
perhaps a DFSORT specialist can !?

probably DFSORT is the wrong tool for doing that...?

thx
dr.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Tue Feb 05, 2008 9:28 pm    Post subject:
Reply with quote

EComp can easiily do that.
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: Tue Feb 05, 2008 10:13 pm    Post subject:
Reply with quote

Quote:
perhaps a DFSORT specialist can !?


Kolusu is a DFSORT specialist - he's on the DFSORT Development team.

Quote:
probably DFSORT is the wrong tool for doing that...?


Probably. While DFSORT can do some types of compare operations, it is not a compare utility.
Back to top
View user's profile Send private message
dr.ostman

New User


Joined: 28 Oct 2005
Posts: 4

PostPosted: Tue Feb 05, 2008 10:44 pm    Post subject: @Frank Yaeger
Reply with quote

plz don't missunderstand me!

i know Kolusu is a specialist ! but i am not!

it was very hard for me to find out what his code does ;)
after that it was even harder to find a way to make it 'dynamic'
and since Kolusu did not provide a dynamic solution i realized that
there is none...

I never used DFSORT before,
my project manager told me to use it for that requirement instead of writing a COBOL - pgm...
he said this must be easy with DFSORT,
now i have found one more point he does not know at all...

thanks for your help !

regards
dr.
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: Tue Feb 05, 2008 10:55 pm    Post subject:
Reply with quote

Many types of compare operations are relatively easy with DFSORT/ICETOOL. However, what you're trying to do is not one of them. I suspect your project manager is not aware of that. I just spoke to Kolusu and he wasn't aware you wanted a "dynamic solution". The IFTHEN clauses can be generated dynamically. Kolusu volunteered to show you how to do that later today.

Of course, you and your project manager will have to evaluate for yourselves whether or not that's the best way to do what you want to do.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Feb 05, 2008 11:05 pm    Post subject:
Reply with quote

Quote:
now i have found one more point he does not know at all...
What a perception.. icon_smile.gif
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: Tue Feb 05, 2008 11:06 pm    Post subject:
Reply with quote

Quote:
I never used DFSORT before


If you want to educate yourself on all of the thing DFSORT/ICETOOL can do well, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Feb 05, 2008 11:08 pm    Post subject: Reply to: compare 2 records in seq. file & report differ
Reply with quote

if You need to compare source code, there are specific tools for it

why not investigate ISPF SUPERC, maybe writing in REXX a post processor
to reformat the output in any way You prefer ??
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Feb 06, 2008 4:02 am    Post subject: Reply to: compare 2 records in seq. file & report differ
Reply with quote

dr.ostman,

Here is DFSORT/ICETOOL Job which will give the desired results. However there are certain limitations for the job.

1. We can compare upto a max lrecl of 9999.
2. Input files are are always FB (no variable block files)

You need to supply the LRECL of the file to be compared via SYMNAMES DD.
Code:

//SYMNAMES DD *
LRECL,+nnnn


The range of n is from +1 to +4096.

Once you supply the LRECL in STEP0100 of the job it automatically builds the control cards on the fly and the actual compare is done in step0200 using the dynamic control cards created in step0100.

Code:

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//SYMNAMES DD *
LRECL,+0080
//IN       DD *
DUMMY RECORD
//C1       DD DSN=&&C1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//C2       DD DSN=&&C2,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//C3       DD DSN=&&C3,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//C5       DD DSN=&&C5,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE)
//T1       DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//T2       DD DSN=&&T2,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//TOOLIN   DD *
  COPY FROM(IN) USING(CTL1)
  COPY FROM(IN) USING(CTL2)
//CTL1CNTL DD *
  SORT FIELDS=COPY
  OUTREC FIELDS=(+0,ADD,LRECL,ZD,LENGTH=4,X,
                 +1,ADD,(+0,MUL,LRECL),ZD,LENGTH=4,X,
                 +1,ADD,LRECL,ZD,LENGTH=4,X,
                 +1,ADD,(+2,MUL,LRECL),ZD,LENGTH=4,80:X)

  OUTFIL FNAMES=T1,
  BUILD=(C'SPLICE FROM(IN) TO(M1) WITHEACH  ON(',16,4,
         C',08,CH) - ',/,
         C'WITH(',11,4,C',',1,4,
         C') KEEPNODUPS USING(CTL1)',/,
         C'COPY FROM(M1) TO(OUT) USING(CTL2)',80:X)

  OUTFIL FNAMES=T2,
  BUILD=(C' OUTFIL FNAMES=OUT,IFOUTLEN=',1,4,C',',/,
         C' IFTHEN=(WHEN=(',16,4,C',',1,4,
         C',CH,EQ,C',C'''',X,C'''',
         C'),BUILD=(01,',1,4,C',/,',
         11,4,C',',1,4,C')),',/,
         C' IFTHEN=(WHEN=NONE,BUILD=(01,',
         1,4,C',/,',16,4,C',',1,4,C',/,',11,4,C',',1,4,
         C'))',80:X)

  OUTFIL FNAMES=C1,
         BUILD=(C' INREC IFTHEN=(WHEN=INIT,',/,
                5X,C'OVERLAY=(',16,4,
                C':SEQNUM,8,ZD,START=2,INCR=1,',/,
                14X,+8,ADD,16,4,ZD,EDIT=(TTTT),
                C':',16,4,C',8,ZD,MOD,+2,TO=ZD,LENGTH=1)),',/,
                4X,C'IFTHEN=(WHEN=(',
                +8,ADD,16,4,ZD,EDIT=(TTTT),
                C',1,ZD,EQ,01),',/,
                5X,C'BUILD=(',11,4,C':01,',1,4,C',',
                16,4,C':',16,4,
                C',8,ZD,SUB,',
                +8,ADD,16,4,ZD,EDIT=(TTTT),
                C',1,ZD,M11,LENGTH=8))',80:X)

  OUTFIL FNAMES=C2,
         BUILD=(C' OUTFIL FNAMES=M1,',/,
                C' IFTHEN=(WHEN=INIT,OVERLAY=(',16,4,C':',
                1,4,C'X)),',80:X)

  OUTFIL FNAMES=C3,
         BUILD=(C' IFTHEN=(WHEN=(1,1,CH,NE,1,1,CH),',
                C'OVERLAY=(1:1,1))',80:X)

  OUTFIL FNAMES=CTL2CNTL,
         BUILD=(C' OPTION COPY,STOPAFT=1',/,
                C' OUTFIL FNAMES=C5,REPEAT=',1,4,C',',/,
                C' OUTREC=(C''',
                C' IFTHEN=(WHEN=(',C'''',C',',
                C'SEQNUM,4,ZD,START=',6,4,C',',72:C'*',/,
                9X,C'C''',C',1,CH,NE,',C'''',C',',
                C'SEQNUM,4,ZD,START=',11,4,C',',72:C'*',/,
                9X,C'C''',C',1,CH),OVERLAY=(',C'''',C',',
                C'SEQNUM,4,ZD,START=',16,4,C',',72:C'*',/,
                9X,C'C''',C':C',C'''',C',C',4C'''',C',C',
                C'''',C'+',C'''',C',C',4C'''',C',C',
                C'''',C'),HIT=NEXT),',C'''',C',80:X)',80:X)
/*
//CTL2CNTL DD DSN=&&C4,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
/*
//STEP0200 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN       DD DSN=YOUR INPUT FILE,
//            DISP=SHR
//M1       DD DSN=&&M1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//OUT      DD SYSOUT=*
//TOOLIN   DD DSN=&&T1,DISP=SHR
//CTL1CNTL DD DSN=&&C1,DISP=SHR
//         DD DSN=&&C2,DISP=SHR
//         DD DSN=&&C5,DISP=SHR
//         DD DSN=&&C3,DISP=SHR
//CTL2CNTL DD DSN=&&T2,DISP=SHR
/*
Back to top
View user's profile Send private message
dr.ostman

New User


Joined: 28 Oct 2005
Posts: 4

PostPosted: Fri Feb 08, 2008 4:12 pm    Post subject:
Reply with quote

@enrico-sorichetti: i am not trying to compare source code, but ouput of interfaces...

@Skolusu:

how can i ever requite that ???

this job does exacly what i need ! but now it is even harder to understand what it does. .. ;-)

there is only one issue: it adds one Byte to the output records. if i use 80 bytes as length the resulting OUT has 81 Bytes.

I have tried to find the problem but i just made it worse...

clould you please have a look ?

thanks a lot in advance

regards
dr.
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 188
Location: india

PostPosted: Mon Feb 11, 2008 11:03 am    Post subject:
Reply with quote

I tried both the JCL's posted above and i am getting the following output for both of them :

Code:
RECORD01INCLUDESSOMETHINGY                                                   
+++++++++++++++++++++++++++++++++++++++++++++++
                                                                             
                                                                             
+++++++++++++++++++++++++++++++++++++++++++++++


can you please tell me is this what we wanted to do....if not then where is the problem
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Feb 11, 2008 10:20 pm    Post subject: Reply to: compare 2 records in seq. file & report differ
Reply with quote

Quote:
this job does exacly what i need ! but now it is even harder to understand what it does. .. ;-)


The job basically generates the dynamic control cards on the fly. TO better understand the job change the temp datasets to permanent datasets and see the contents of them.

Just run only step0100 with all permanent datasets and browse the contents of them

Quote:

there is only one issue: it adds one Byte to the output records. if i use 80 bytes as length the resulting OUT has 81 Bytes.


hmm I re-ran the job once again and I still get the correct output of 80 bytes. If I had to guess then you input file might be a FBA file. Show me your DFSMSG sysout from step0200. Or just show me messages ICE088I and ICE210I.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Feb 11, 2008 10:21 pm    Post subject:
Reply with quote

rajatbagga wrote:
I tried both the JCL's posted above and i am getting the following output for both of them :

Code:
RECORD01INCLUDESSOMETHINGY                                                   
+++++++++++++++++++++++++++++++++++++++++++++++
                                                                             
                                                                             
+++++++++++++++++++++++++++++++++++++++++++++++


can you please tell me is this what we wanted to do....if not then where is the problem


rajatbagga,

The job I have shown gives the correct results. You must be doing somehting wrong. Show me your sysout messages.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Feb 11, 2008 11:37 pm    Post subject:
Reply with quote

as others have stated before I DO think dfsort/syncsort are not the proper tools for this task, as enrico I'd try SUPERC or even try Cobol (or Rexx!!!!).

can you imagine yourself changing that sysin becouse the file copybook has changed?
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 188
Location: india

PostPosted: Tue Feb 12, 2008 8:00 am    Post subject:
Reply with quote

Hello Skolusu,

DFSMSG:

Code:
ICE146I 0 END OF STATEMENTS FROM CTL1CNTL - PARAMETER LIST STATEMENTS FOLLOW   
          DEBUG NOABEND,ESTAE                                                 
          OPTION MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CTL1,SORTIN=IN,S
                         TOUT=T1,DYNALLOC,SZERO,EQUALS,NOVLSHRT,LOCALE=NONE,NOC
                         CK                                                   
          SORT FIELDS=(161,8,CH,A)                                             
          MODS E35=(ICE35DU,12288)                                             
ICE201I 0 RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICE193I 0 ICEAM2 ENVIRONMENT IN EFFECT - ICEAM2 INSTALLATION MODULE SELECTED   
ICE088I 1 K010A@AZ.STEP0100.        , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,4194304,4169728)                                 
ICE156I 0 MAIN STORAGE ABOVE 16MB = (4112368,4112368)                         
ICE127I 0 OPTIONS: OVFLO=RC16,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y
ICE128I 0 OPTIONS: SIZE=4194304,MAXLIM=1048576,MINLIM=450560,EQUALS=Y,LIST=Y,ER
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=SHORT,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=N,WRKREL=Y,OUTREL=Y,CKPT
ICE131I 0 OPTIONS: TMAXLIM=4194304,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW
OPTIONS: VLSHRT=N,ZDPRINT=N,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXIT
OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=2097152,SOLRF=Y,VLLONG=
BSAM ACCESS METHOD USED FOR IN                                       
DC 500000 TC 0 CS DSVNN KSZ 12 VSZ 12                               
FSZ=6250 RC  IGN=0 E  AVG=172 0  WSP=1396 C  DYN=0 0                 
STORAGE USED FOR OUTFIL : BELOW 16M = 22528, ABOVE 16M = 2114560     
T1       : EXCP USED, LRECL = 240, BLKSIZE = 27840, TYPE = FB   (SDB)
IN MAIN STORAGE SORT                                                 
INSERT 2, DELETE 2                                                   
RECORDS - IN: 2, OUT: 2                                             
T1       : DELETED = 0, REPORT = 0, DATA = 2                         
T1       : TOTAL IN = 2, TOTAL OUT = 2                               
NUMBER OF BYTES SORTED: 160                                         
TOTAL WORK DATA SET TRACKS ALLOCATED: 0 , TRACKS USED: 0             
HIPERSPACE STORAGE USED = 0K BYTES                                   
DATA SPACE STORAGE USED = 0K BYTES                                   
C5C6C7C8E9C9E5E6E7DED5D9CBE8                                         
END OF DFSORT                                                       
IDENTIFIER FROM CALLING PROGRAM IS 0002                             
BLOCKSET     COPY  TECHNIQUE SELECTED                               
- CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 00:12 ON TUE FEB
 OUTFIL FNAMES=OUT,IFOUTLEN=80,                                     
 IFTHEN=(WHEN=(161,80,CH,EQ,C' '),BUILD=(01,80,/,081,80)),           
 IFTHEN=(WHEN=NONE,BUILD=(01,80,/,161,80,/,081,80))                 
END OF STATEMENTS FROM CTL2CNTL - PARAMETER LIST STATEMENTS FOLLOW   
DEBUG NOABEND,ESTAE                                                 
OPTION MSGDDN=DFSMSG,LIST,MSGPRT=ALL,RESINV=0,SORTDD=CTL2,SORTIN=T1,S
               TOUT=OUT,DYNALLOC                                     
SORT FIELDS=COPY                                                     
RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICEAM2 ENVIRONMENT IN EFFECT - ICEAM2 INSTALLATION MODULE SELECTED   
K010A@AZ.STEP0100.        , INPUT LRECL = 240, BLKSIZE = 27840, TYPE
MAIN STORAGE = (MAX,4194304,4194304)                                 
MAIN STORAGE ABOVE 16MB = (4136944,4136944)                         
OPTIONS: OVFLO=RC16,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y
OPTIONS: SIZE=4194304,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ER
OPTIONS: VIO=N,RESDNT=ALL ,SMF=SHORT,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT
OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT
OPTIONS: TMAXLIM=4194304,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW
OPTIONS: VLSHRT=N,ZDPRINT=N,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXIT
OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=2097152,SOLRF=Y,VLLONG=
EXCP ACCESS METHOD USED FOR T1                                       
STORAGE USED FOR OUTFIL : BELOW 16M = 25600, ABOVE 16M = 2114560     
OUT      : BSAM USED, LRECL = 80, BLKSIZE = 27840, TYPE = FB         
INSERT 0, DELETE 0                                                   
RECORDS - IN: 2, OUT: 2                                             
OUT      : DELETED = 0, REPORT = 0, DATA = 6                         
OUT      : TOTAL IN = 2, TOTAL OUT = 6                               
ICE751I 0 C5C6C7C8E9C9E5E7EFCBF0E8   
ICE052I 0 END OF DFSORT             


TOOLMSG:

Code:
ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED                                   
                                                                               
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS:  TOOLIN                               
                                                                               
                                                                               
ICE630I 0 MODE IN EFFECT:  STOP                                               
                                                                               
              SPLICE FROM(IN) TO(T1) WITHEACH  ON(161,08,CH) -                 
              WITH(081,80) KEEPNODUPS USING(CTL1)                             
ICE606I 0 DFSORT CALL 0001 FOR SORT FROM IN       TO T1       USING CTL1CNTL CO
ICE628I 0 RECORD COUNT:  000000000000002                                       
ICE638I 0 NUMBER OF RECORDS RESULTING FROM CRITERIA:  000000000000002         
ICE602I 0 OPERATION RETURN CODE:  00                                           
                                                                               
              COPY FROM(T1) TO(OUT) USING(CTL2)                               
ICE606I 0 DFSORT CALL 0002 FOR COPY FROM T1       TO OUT      USING CTL2CNTL CO
ICE602I 0 OPERATION RETURN CODE:  00                                           
ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE:  00


OUT:

Code:
RECORD01INCLUDESSOMETHINGY                                                     
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                                                               
                                                                               
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++         



And I have used your first posted JCL in this case. Now please tell me where I went wrong.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Feb 12, 2008 10:40 pm    Post subject:
Reply with quote

rajatbagga,

You'll need DFSORT R14 PTF UK90006 (April, 2006) in order to use INREC with SPLICE (you are running DFSORT REL 14.0).

Ask your System Programmer to install it (it's free). You would need an additional pass without the PTF.
Back to top
View user's profile Send private message
rajatbagga

Active User


Joined: 11 Mar 2007
Posts: 188
Location: india

PostPosted: Wed Feb 13, 2008 7:45 am    Post subject:
Reply with quote

hi Skolusu,

Thanks for telling me the problem...Its very difficult to contact system programers at my site and even they wont agree for this..... icon_sad.gif

Is there any other way to code this JCL then please let me know...
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Feb 13, 2008 6:59 pm    Post subject:
Reply with quote

A day to write a COBOL program to do this, and another half a day to change it to handle the changed spec's (multiple different record lengths) and this discussion has gone on for 12 days. What a waste.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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