DFSORT help2



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

DFSORT help2

Postby pulcinella » Wed Aug 26, 2009 11:37 am

It comes from the old post. Which I copied to understand it better

Hello,

I have other file with 16 positions and I need matching with the output file (OUT1) generated in the previous example (37 positions) for obtain two files:

output 1 a file that the key are the same
output 2 a file that the key are not the same


Input1 (15)
-----------

00000002xxxx006
00000002xxxx008
00000003xxxx001
00000004xxxx003
00000004xxxx008
00000008xxxx002
00000008xxxx003

Input2 (37) output file of previus example
-----------

00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx008
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx004
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx008
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx004
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx011

(the field with 'x' is not relevant for comparation. )

output1 (37) the same
------------

00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx008
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx008
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002

output2 (15) not the same
-------------

00000003xxxx001
00000008xxxx003

Thank you very much
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT help2

Postby Frank Yaeger » Wed Aug 26, 2009 8:58 pm

Do you want to match records on positions 1-8 and 13-15 of Input1 vs 1-8 and 35-37 of Input2?

Can Input1 have duplicates on 1-8 and 13-15?

Please give a complete explanation of the "rules" you want to use for getting from input to output.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: DFSORT help2

Postby pulcinella » Thu Aug 27, 2009 11:04 am

Excuse Frank,

the position 1-8 of input1 can be duplicates. The position 13-15 can't be duplicates. The primary key is 1-8; the secundary key is 13-15. (00000001xxxx001; 00000001xxxx003; 00000001xxxx004)

At input2 the position 1-8 and 35-3 can be duplicates (00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001; 00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001; 00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001). In this case, the values 'x' are different but it's not necessary for comparation

As you see I compare the positions 1-8, 13-15 of input1 with the positions 1-8, 35-37 of input2. This is positions
are the keys of both files.

I need compare the first 1-8 position and If it's are the same, compare the other position (13-15 input1; 35-37 input2)

thanks
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT help2

Postby skolusu » Fri Aug 28, 2009 2:46 am

pulcinella ,

The following DFSORT/ICETOOL JCl will give you the desired results
//STEP0100 EXEC PGM=ICETOOL                                     
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//FB15     DD DSN=your input FB 15 byte file,DISP=SHR
//FB37     DD DSN=your input FB 37 byte file,DISP=SHR
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)   
//OUT1     DD SYSOUT=*                                           
//OUT2     DD SYSOUT=*                                           
//TOOLIN   DD *                                                 
  COPY FROM(FB15) USING(CTL1)                                   
  COPY FROM(FB37) USING(CTL2)                                   
  SPLICE FROM(T1) TO(OUT1) ON(38,11,CH) WITH(1,37) WITH(50,1) - 
  WITHALL KEEPNODUPS USING(CTL3)                                 
//CTL1CNTL DD *                                                 
  OUTFIL FNAMES=T1,OVERLAY=(38:1,8,13,3,C'11')                   
//CTL2CNTL DD *                                                 
  OUTFIL FNAMES=T1,OVERLAY=(38:1,8,35,3,C'22')                   
//CTL3CNTL DD *                                                 
  OUTFIL FNAMES=OUT1,INCLUDE=(49,2,ZD,EQ,12),BUILD=(1,37)       
  OUTFIL FNAMES=OUT2,INCLUDE=(49,2,ZD,EQ,11),BUILD=(1,15)       
/*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: DFSORT help2

Postby pulcinella » Fri Aug 28, 2009 12:45 pm

Excuse me skolusu

When I run this solution, I receive the next message:

ICE630I 0 MODE IN EFFECT: STOP

COPY FROM(FB15) USING(CTL1)
ICE606I 0 DFSORT CALL 0001 FOR COPY FROM FB015 TO OUTFIL USING CTL1CNTL TERMINATED
ICE602I 0 OPERATION RETURN CODE: 16

ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE222A 0 50 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 186 BYTE LRECL FOR T1
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 E7-K44563
ICE052I 3 END OF DFSORT

Can you help me, please?
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT help2

Postby pulcinella » Fri Aug 28, 2009 5:05 pm

TOOLMSG
-------

ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED

ICE650I 0 VISIT http://www.ibm.com/storage/dfsort FOR ICETOOL PAPERS, EXAMPLES AND MORE

ICE632I 0 SOURCE FOR ICETOOL STATEMENTS: TOOLIN


ICE630I 0 MODE IN EFFECT: STOP

COPY FROM(FB015) USING(CTL1)
ICE606I 0 DFSORT CALL 0001 FOR COPY FROM FB015 TO OUTFIL USING CTL1CNTL TERMINATED
ICE602I 0 OPERATION RETURN CODE: 16

ICE630I 2 MODE IN EFFECT: SCAN

COPY FROM(FB173) USING(CTL2)
ICE612I 0 NO ERRORS FOUND IN STATEMENT

SPLICE FROM(T1) TO(OUT1) ON(1,8,CH) ON(13,3,CH) WITH(1,16) -
WITH(18,1) WITHALL KEEPNODUPS USING(CTL3)
ICE612I 0 NO ERRORS FOUND IN STATEMENT


ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE: 16



DFSMSG
------

ICE200I 0 IDENTIFIER FROM CALLING PROGRAM IS 0001
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 13:05 ON FRI AUG 28, 2009 -
OUTFIL FNAMES=T1,OVERLAY=(17:C'11')
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=FB015,*
DYNALLOC
SORT FIELDS=COPY
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE222A 0 18 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 186 BYTE LRECL FOR T1
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 E7-K44563
ICE052I 3 END OF DFSORT
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT help2

Postby skolusu » Fri Aug 28, 2009 10:20 pm

ICE222A 0 50 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 186 BYTE LRECL FOR T1
ICE222A 0 18 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 186 BYTE LRECL FOR T1


Pulcinella,

*sigh* In your first post you mentioned that your input LRECL is 15 and 37 bytes. Why are you running with a 50 and 186 byte lrecl files? I posted the solution based on your initial post. Post the DCB properties of the files involved both input and output
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: DFSORT help2

Postby pulcinella » Sun Aug 30, 2009 12:51 am

Skolusu,

ignore why seems that files that have 50 and 186 lrecl but it's wrong... When I make sort of both files I put 15 and 37 and FB; the output of this label's are 15 and 37. When I browsed the file's information have 15 and 37... Monday saw the files and i answered but I am sure that the file have been created by 15 and 37 lenght
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT help2

Postby pulcinella » Fri Sep 04, 2009 11:35 am

I think that i found the problem.

I explain at post "compare files if you meet a condition". it was a problem with T1 variable storage because I used the same variable at two steps. Excuse me.

Can you help me in an explication?.

I would know why at post "DFSORT help" it's used WITH(185,1):

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//FB037 DD DSN=Your fb 37 byte file,DISP=SHR
//FB173 DD DSN=your fb 173 byte file,DISP=SHR
//T1 DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//TOOLIN DD *
SORT FROM(FB173) USING(CTL1)
COPY FROM(FB037) USING(CTL2)
SPLICE FROM(T1) TO(OUT1) ON(174,11,CH) WITH(1,173) WITH(185,1) -
WITHALL KEEPNODUPS USING(CTL3)
//CTL1CNTL DD *
SORT FIELDS=(1,8,CH,A,13,3,CH,A),EQUALS
SUM FIELDS=NONE
OUTFIL FNAMES=T1,OVERLAY=(174:1,8,13,3,C'11')
//CTL2CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(174:1,8,35,3,C'22')
//CTL3CNTL DD *
OUTFIL FNAMES=OUT1,INCLUDE=(185,2,ZD,EQ,21),BUILD=(1,37)
OUTFIL FNAMES=OUT2,INCLUDE=(185,2,ZD,EQ,11),BUILD=(1,173)
/*

and in this post, it's used WITH(50,1):

//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//FB15 DD DSN=your input FB 15 byte file,DISP=SHR
//FB37 DD DSN=your input FB 37 byte file,DISP=SHR
//T1 DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(X,Y),RLSE)
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//TOOLIN DD *
COPY FROM(FB15) USING(CTL1)
COPY FROM(FB37) USING(CTL2)
SPLICE FROM(T1) TO(OUT1) ON(38,11,CH) WITH(1,37) WITH(50,1) -
WITHALL KEEPNODUPS USING(CTL3)
//CTL1CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(38:1,8,13,3,C'11')
//CTL2CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(38:1,8,35,3,C'22')
//CTL3CNTL DD *
OUTFIL FNAMES=OUT1,INCLUDE=(49,2,ZD,EQ,12),BUILD=(1,37)
OUTFIL FNAMES=OUT2,INCLUDE=(49,2,ZD,EQ,11),BUILD=(1,15)
/*

I think that must be WITH(49,1) (38 + 11 = 49 but not 50).

Thank you very much
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post