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
 

 

Comparison of BLOCKS OF RECORDS present in 2 Input Files.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Subhasish Sarkar

New User


Joined: 21 Oct 2011
Posts: 16
Location: India

PostPosted: Thu Nov 03, 2011 5:34 pm    Post subject: Comparison of BLOCKS OF RECORDS present in 2 Input Files.
Reply with quote

Hi All,

I have 2 Input Files, say, FILE A (LRECL=80 and RECFM=FB) and FILE B (LRECL=80 and RECFM=FB).

SAMPLE INPUT FILE A Contents: -
---------------------------------------
Code:

AAP12003029M-MPRMAS620WMKKYSSY0107
229540830 32998 -673-388 410900 72
75127512741275 900 895 898 912 915
84 578 585 582 5973 5969 5973 5969
 7529 7730 -64 -68 -66 -65  89  86
01010003050603 2830 2812 2699 2953
-11  -13  -06  -08 846 836 843 824
00022044044022////////////00000022
6+++++++++++++++++++++++++++++++++

AAP12003029M-MPSMAS614VTBSOMSJ0107
430840844 31998  043-335 437200 69
34123412341234 896 893 899 899 916
67 574 569 569 6352 6348 6367 6352
 7697 7680  13  13  31  18  94  93
00010308050505 2837 2797 2728 2681
 86  -04  -15  -06 836 837 826 830
00022044044022////////////000000 
9+++++++++++++++++++++++++++++++++

AAP12003029M-MPSMAS614EDDFWMKK0107
332580834 28958-1095-430 498200 69
49124912491249 883 881 885 886 899
89 594 594 591 7234 7227 7246 7238
 8852 8844 -99 -99 -84 -96  80  80
00010311070507 3106 3062 3026 2975
-07  -03  -15  -05 847 850 839 840
00022044044022////////////000000 
0+++++++++++++++++++++++++++++++++


'AAP' followed by 8 more records constitute a BLOCK OF RECORD.

Another point to note here is that the actual Input FILE A does not contain any SPACES between each BLOCK OF RECORD. I have deliberately inserted SPACES between each BLOCK OF RECORD here for clarity and ease of understanding.


SAMPLE INPUT FILE B Contents: -
---------------------------------------
Code:

AAP12003029M-MPSMAS617WMKKYSSY3110
129940835 32999 -366-368 415000 81
78127712781277 904 902 910 904 916
67 577 577 581 6031 6023 6039 6031
 7531 7543 -29 -29 -14 -28  93  89
00010109040505 2797 2754 2641 2750
-08  -04  -16  -13 835 844 831 844
00022044044022////////////000000 
5+++++++++++++++++++++++++++++++++

AAP12003029M-MPSMAS614EDDFWMKK0107
332580834 28958-1095-430 498200 69
49124912491249 883 881 885 886 899
89 594 594 591 7234 7227 7246 7238
 8852 8844 -99 -99 -84 -96  80  80
00010311070507 3106 3062 3026 2975
-07  -03  -15  -05 847 850 839 840
00022044044022////////////000000 
0+++++++++++++++++++++++++++++++++

AAP12003029M-MPRMAS620WMKKYSSY0107
229540830 32998 -673-388 410900 72
75127512741275 900 895 898 912 915
84 578 585 582 5973 5969 5973 5969
 7529 7730 -64 -68 -66 -65  89  86
01010003050603 2830 2812 2699 2953
-11  -13  -06  -08 846 836 843 824
00022044044022////////////00000022
6+++++++++++++++++++++++++++++++++


My requirement is, A Particular BLOCK OF RECORD is present in the INPUT FILE B but the same BLOCK OF RECORD is not present in the INPUT FILE A. Such a BLOCK OF RECORD needs to be written into the Output File, say, FILE C.

How could this be acheived using DFSORT?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Nov 03, 2011 6:18 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

the quick and dirty way would be to reformat the input datasets,
build one large record from the 9 small records ( 9*80 is still a manageable record length )

carry on the mangling considering in this way records rather than blocks

and after that re-format the output to the original layout .

( if a proper blksize is chosen, it could be just an explicit DCB info in the DD statement )
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Thu Nov 03, 2011 7:52 pm    Post subject:
Reply with quote

Subhasish Sarkar,
Are you sure that 80 bytes FB is the actual lengths of the file(s), you are working with?

If your LRECL changes, solution developed considering 80 bytes FB won't work and things get real ugly.

Thanks,
Back to top
View user's profile Send private message
Subhasish Sarkar

New User


Joined: 21 Oct 2011
Posts: 16
Location: India

PostPosted: Thu Nov 03, 2011 8:01 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

Hi sqlcode1,

Both the Input Files, indeed, have the attributes LRECL=80 and RECFM=FB. Please do not get confused looing at the code snippets of the Input Files I have provided here.
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: Thu Nov 03, 2011 11:30 pm    Post subject:
Reply with quote

Can you have duplicate blocks within input file A?

Can you have duplicate blocks within input file B?
Back to top
View user's profile Send private message
Subhasish Sarkar

New User


Joined: 21 Oct 2011
Posts: 16
Location: India

PostPosted: Thu Nov 03, 2011 11:45 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

Hi Frank,

Neither of the Input Files would have duplicate BLOCKS OF RECORDS.
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: Fri Nov 04, 2011 1:04 am    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//INA DD DSN=...  input file A (FB/80)
//INB DD DSN=...  input file B (FB/80)
//TA DD DSN=&&TA,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//TB DD DSN=&&TB,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=...  output file (FB/80)
//TOOLIN DD *
RESIZE FROM(INA) TO(TA) TOLEN(720)
RESIZE FROM(INB) TO(TB) TOLEN(720)
COPY JKFROM USING(CTL1)
/*
//CTL1CNTL DD *
  JOINKEYS F1=TA,FIELDS=(1,720,A)
  JOINKEYS F2=TB,FIELDS=(1,720,A)
  JOIN UNPAIRED,F2,ONLY
  REFORMAT FIELDS=(F2:1,720)
  OUTFIL FNAMES=OUT,
    BUILD=(1,80,/,81,80,/,161,80,/,241,80,/,321,80,/,
           401,80,/,481,80,/,561,80,/,641,80)
/*
Back to top
View user's profile Send private message
Subhasish Sarkar

New User


Joined: 21 Oct 2011
Posts: 16
Location: India

PostPosted: Fri Nov 04, 2011 4:37 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

Hi Frank,

I am afraid the code provided by you is not working.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Fri Nov 04, 2011 4:45 pm    Post subject: Re: Reply to: Comparison of BLOCKS OF RECORDS present in 2 I
Reply with quote

Subhasish Sarkar wrote:
I am afraid the code provided by you is not working.


That is a very worthless comment. What are the results and what is wrong with them?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Nov 04, 2011 5:06 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

Worthless, false and rude, I'd go with.

Post everything. Sort cards. JCL. DFSORT level, JES output, examples of input and output. Everthing in the Code tags.

You'd best be exactly right in what you are saying. That from all the data you provided before your were handed a solution on a plate, that that is not "working".

Don't check anything, don't think before posting it, don't wonder if it is some fault of yours in any way - Nike. Just do it.
Back to top
View user's profile Send private message
Subhasish Sarkar

New User


Joined: 21 Oct 2011
Posts: 16
Location: India

PostPosted: Fri Nov 04, 2011 6:00 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

JCL used: -
===========
Code:

//STEP8    EXEC PGM=ICETOOL                                             
//TOOLMSG  DD   SYSOUT=*                                               
//DFSMSG   DD   SYSOUT=*                                               
//INA      DD   DSN=EAPP.TEAM3.MPRMPS.TKO.NOV0411.TEST,DISP=SHR         
//INB      DD   DSN=EAPP.TEAM3.MPRMPS.TKO4.G3V.TEST,DISP=SHR           
//TA       DD   DSN=&&TEMPDS1,                                         
//         DISP=(NEW,PASS,DELETE),                                     
//         UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE)                       
//TB       DD   DSN=&&TEMPDS2,                                         
//         DISP=(NEW,PASS,DELETE),                                     
//         UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE)                       
//OUT      DD   DSN=EAPP.TEAM3.MPRMPS.TKO5(+1),                         
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=PRODA,SPACE=(CYL,(10,10),RLSE)                   
//TOOLIN   DD *                                                         
  RESIZE FROM(INA) TO(TA) TOLEN(720)                                   
  RESIZE FROM(INB) TO(TB) TOLEN(720)                                   
  COPY JKFROM USING(CTL1)                                               
/*                                                                     
//CTL1CNTL DD *                                                         
  JOINKEYS F1=TA,FIELDS=(1,720,A)                                       
  JOINKEYS F2=TB,FIELDS=(1,720,A)                                       
  JOIN UNPAIRED,F2,ONLY                                                 
  REFORMAT FIELDS=(F2:1,720)                                           
  OUTFIL FNAMES=OUT,                                                   
    BUILD=(1,80,/,81,80,/,161,80,/,241,80,/,321,80,/,                   
           401,80,/,481,80,/,561,80,/,641,80)                           
/*                     


Contents of INA Input File "EAPP.TEAM3.MPRMPS.TKO.NOV0411.TEST": -
Code:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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CCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C                                                                       


NOTE: - Records from columns 1 to 72 shown. Records from columns 73 to 80 not shown here.


Contents of INB Input File "EAPP.TEAM3.MPRMPS.TKO4.G3V.TEST": -

Code:

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C                                                                       
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A                                                                       
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
D                                                                                                         



Contents of the Output File here should have been those ENTIRE BLOCKS of RECORDS which are present in the Input File INB but not present in the Input File INA. In other words, the below mentioned 3 BLOCKS OF RECORDS entirely should have been written into the Output File.

Code:

BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB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DDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
D                                                                       


But, the Original contents of the Output File after running/executing the JCL is as below, which is not correct.

Code:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A                                                                       
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
B                                                                       
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE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CCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
D                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
E                                                                       
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA


If you notice, even some unwanted SPACES have crept into the Output File.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Nov 04, 2011 7:12 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

And where is the rest of the stuff you were asked to post? All the output messages?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Nov 04, 2011 7:32 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

Your initial data shows blocks of nine records. 80-bytes-per-record gives you the temporary extened record of 720 bytes, as was supplied to you in the solution. You also mentioned that eight records plus one represent a block.

Now you are showing test data with more than nine records. You will have to amend the 720 appropriately, or delete the superfuous test data, dependning which mistake you made.

Bear in mind in case there is a next time, the DFSORT team always test their solutions with the information provided.

It is impossible for them, or anyone else, to provide solutions for previously unknown combinations of data.

EDIT: And of course the code to return to 80-byte records needs to be updated if 11 is the number. I was going to state it, and I have to state it explicitly, in case you think it is someone elses fault (mine in this case) if it next does not give you the correct solution.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Fri Nov 04, 2011 7:47 pm    Post subject:
Reply with quote

Subhasish Sarkar,
I am not Frank but here is why your code isn't working. There inconsitencies in your requirement(s).

1) 'AAP' followed by 8 more records constitute a BLOCK OF RECORD.
I don't see any AAP record here but that's a minor issue.I am not Frank, but based on this statement, his solution assumes that for any block of records, you could only have total of 9 (including header) record and that's why he is "RESIZE"ing to 720. Now, you are left with some unmatched records and see you completely unexpected results.

For these set of files as is (don't modify records again)... Try below untested.
Code:
//STEP8    EXEC PGM=ICETOOL                                             
//TOOLMSG  DD   SYSOUT=*                                               
//DFSMSG   DD   SYSOUT=*                                               
//INA      DD   DSN=EAPP.TEAM3.MPRMPS.TKO.NOV0411.TEST,DISP=SHR         
//INB      DD   DSN=EAPP.TEAM3.MPRMPS.TKO4.G3V.TEST,DISP=SHR           
//TA       DD   DSN=&&TEMPDS1,                                         
//         DISP=(NEW,PASS,DELETE),                                     
//         UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE)                       
//TB       DD   DSN=&&TEMPDS2,                                         
//         DISP=(NEW,PASS,DELETE),                                     
//         UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE)                       
//OUT      DD   DSN=EAPP.TEAM3.MPRMPS.TKO5(+1),                         
//         DISP=(NEW,CATLG,DELETE),                                     
//         UNIT=PRODA,SPACE=(CYL,(10,10),RLSE)                   
//TOOLIN   DD *                                                         
  RESIZE FROM(INA) TO(TA) TOLEN(880) --> You need to change this, if you expect more than 11 records                                 
  RESIZE FROM(INB) TO(TB) TOLEN(880) --> You need to change this, if you expect more than 11 records                                                                     
  COPY JKFROM USING(CTL1)                                               
/*                                                                     
//CTL1CNTL DD *                                                         
  JOINKEYS F1=TA,FIELDS=(1,880,A) --> Same goes here                                       
  JOINKEYS F2=TB,FIELDS=(1,880,A) --> Same goes here                                                                             
  JOIN UNPAIRED,F2,ONLY                                                 
  REFORMAT FIELDS=(F2:1,880)  --> Same goes here                                                                                             
  OUTFIL FNAMES=OUT,                                                   
    BUILD=(001,80,/,          --> Build all 11 records
           081,80,/,
      161,80,/,
      241,80,/,
      321,80,/,                   
           401,80,/,
      481,80,/,     
      561,80,/,
      641,80,/,
      721,80,/,     
      801,80)                           
/*           

Thanks,
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Nov 04, 2011 8:00 pm    Post subject:
Reply with quote

It seems likely to me that Subhasish is unable to speak as to the number of records per block in any given execution. That being the case, would it be worthwhile to have Mr. Yaeger's solution skeletonized so that Subhasish need not disturb himself trying to adapt it to his need of the moment?
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Fri Nov 04, 2011 9:30 pm    Post subject:
Reply with quote

Akatsukami,
This is going to be a bold statement but using RESIZE with variable block size(no. of records per block) wouldn't be possible. In fact without knowing max. number of records,which constitute a block, it is not possible anyways.

We need something like RESIZE with ON fields and max. length. That will be a nice feature to have. Anyways its that time of the year and we expect goodies from DFSort team...icon_smile.gif

Thanks,
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Nov 04, 2011 9:38 pm    Post subject: Reply to: Comparison of BLOCKS OF RECORDS present in 2 Input
Reply with quote

Akatsukami,
in these cases the best approach would be to skeletonize the TS icon_biggrin.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: Fri Nov 04, 2011 10:59 pm    Post subject:
Reply with quote

Quote:
I am afraid the code provided by you is not working.


It does work for the data you showed in your original post (9 records per block). It does not work for the data you showed in your new post (11 records per block). I can only give you solutions based on what you tell me - I can't read your mind. GIGO. icon_rolleyes.gif

If you explain your requirement accurately and clearly, I can attempt to give you a solution that works for the requirement as explained. I cannot attempt to give you a solution that will work for every possibility unless I know what every possibility is.
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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