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 

DFSORT compare Packed decimal with Zone decimal.
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Nov 05, 2014 12:14 pm    Post subject: DFSORT compare Packed decimal with Zone decimal. Reply with quote

Hi,

I am trying create a Joinkey.

Input file1
Code:

RRRCCCCCCCM123456 F
RRRCCCCCCCM123457 F


Input file 2
Code:

7/AN        9/PS               
(1-7)       (8-16)             
2---------- 3------------------
*******************************
CCCCCCC        1234562102260100
CCCCCCC        1234562102260200
CCCCCCC        1234562102400100
CCCCCCC        1234562201010100
CCCCCCC        1234562201200100
CCCCCCC        1234562201400100
CCCCCCC        1234560101010100


I need to join the record between these two files.
Since File2 is packed decmial and sorted in a different order, I built the File1 as File2 using following Sort
you could see I took 4,7 and Left 11th byte and the 12,6 and added to make or to match with input file 2

Not sure if the below conversion is right Sad

Code:

//SORTIN DD DSN=Input file 1,DISP=SHR   
//SORTOUT DD DSN=TST.MJ.TEST,DISP=(NEW,CATLG,DELETE),         
//           SPACE=(CYL,(50,50),RLSE),                       
//           UNIT=SYSDA                                       
//SYSIN DD *                                                 
  OPTION COPY                                                 
  INREC BUILD=(4,7,12,6,C'0101010100')                       
  OUTREC BUILD=(1,7,8,16,ZD,TO=PD,LENGTH=9)                   
/*                                                           


I am adding 0101010100, because for those matching records i need to have some changes in the output. (Postion of changes in input file 2 is 59,1)



Then wrote this joinkeys.

Code:

//S1   EXEC  PGM=SORT                                           
//SYSOUT DD SYSOUT=*                                           
//SORTJNF1 DD DSN=INput 2 file,DISP=SHR 
//SORTJNF2 DD DSN=TST.MJ.TEST,DISP=SHR                         
//SORTOUT DD DSN=TST.MJ.TEST.SORTOUT1,DISP=(,CATLG,DELETE),     
//          SPACE=(CYL,(50,50),RLSE)                           
//SYSIN  DD *                                                   
  JOINKEYS FILE=F1,FIELDS=(5,16,A),SORTED                       
  JOINKEYS FILE=F2,FIELDS=(1,16,A)                             
  REFORMAT FIELDS=(F1:1,4,?,F1:5)                               
  JOIN UNPAIRED,F1,ONLY                                         
  OPTION COPY                                                   
  OUTFIL IFTHEN=(WHEN=(64,1,CH,EQ,C'3',AND,5,1,CH,EQ,C'B'),     
          BUILD=(1,4,6,58,64:C'6',65)),                         
         IFTHEN=(WHEN=(64,1,CH,EQ,C'5',AND,5,1,CH,EQ,C'B'),     
          BUILD=(1,4,6,58,64:C'8',65)),                         
         IFTHEN=(WHEN=(64,1,CH,EQ,C'6',AND,5,1,CH,EQ,C'B'),     
          BUILD=(1,4,6,58,64:C'9',65)),                         
         IFTHEN=(WHEN=NONE,BUILD=(1,4,6))                                         


For matching records, if 59,1 = 3 then ovelay 6, If 5 then 8 and If 6 then 9.

Since it is VB + ? i gave 64,1 for above condition

for Unmatched records no changes, Input file should come in output file.

Problem i have is output is building with 255, though i build with 254 only.

Please advice.

Thanks
Magesh
Back to top
View user's profile Send private message
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Nov 05, 2014 12:20 pm    Post subject: Reply with quote

Additional information

Input file 2 Length is 254/VB
And it has 45 Million records

Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 05, 2014 1:30 pm    Post subject: Reply with quote

Magesh_J,

In Joinkeys operation, the matching keys will be treated as binary, so they must be "normalized". For example, if the keys are actually zoned decimal, they must have all C and D signs, or all F and D signs. You can use an INREC statement in JNF1CNTL and/or JNF2CNTL to normalize the keys for the F1 file and/or F2 file, respectively, if appropriate.

I am not sure as to why you need to add C'0101010100' for file 1 to match.

Please answer the following questions.

1. What is the cobol layout definitions of input file 1?

Your keys in input file 1 are :
Code:

CCCCCCC 123456
CCCCCCC 123457


Character data is clear but now you need to take the 6 bytes zoned decimal number(123456) and match it with 8 packed decimal number but only the leading 3 bytes(byte 9 thru 11) of input file2 which is in packed decimal format?

Code:

9-16         9-11   
--------     --------
13520200     135     
24612610     246     


Is that it?
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Nov 05, 2014 2:37 pm    Post subject: Reply with quote

Thanks kolusu for looking into it.

Kolusu wrote:

I am not sure as to why you need to add C'0101010100' for file 1 to match.


I need to match only records having 0101010100 in inputfile2..

if I use the first sort code, output would be like below, which mean we got something the same format we have it in file2. So now we compare against

Code:

7/AN        9/PS               
(1-7)       (8-16)             
2---------- 3------------------
CCCCCCC        1234560101010100


Kolusu wrote:

1. What is the cobol layout definitions of input file 1?


X(17) + Filler + X(1)

Kolusu wrote:

Character data is clear but now you need to take the 6 bytes zoned decimal number(123456) and match it with 8 packed decimal number but only the leading 3 bytes(byte 9 thru 11) of input file2 which is in packed decimal format?


In input file2
First field is X(7)
second fields is S9(17) comp-3

In that this value is 123456101010100 stored.

I mean in the s9(17), last ten digit we have to exclude and consider rest of the value.

Code:


second input file.
7/AN        9/PS               
(1-7)       (8-16)             
2---------- 3------------------
*******************************
CCCCCCC        1234562102260100   => It should not match, Copy to output
CCCCCCC        1234562102260200  => It should not match,Copy to output
CCCCCCC        1234562102400100  => It should not match,Copy to output
CCCCCCC        1234562201010100  => It should not match,Copy to output
CCCCCCC        1234562201200100 => It should not match,Copy to output
CCCCCCC        1234562201400100 => It should not match,Copy to output
CCCCCCC        1234560101010100  => It should match, for this matching record we have to change 59th position if 3 then 6, If 5 then 8 and If 6 then 9 and copy to output.



not sure if I answered your question.


Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 05, 2014 3:10 pm    Post subject: Reply with quote

Magesh_J,

If your intention is to get both matched and unmatched records from File, then you just need JOIN UNPAIRED,F1. Remove the ONLY as it gets only the unmatched records.

Anyway here is a Job which will give you the desired results.

Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//VB254    DD DISP=SHR,DSN=Your Input VB 254 byte file   
//FB018    DD DISP=SHR,DSN=Your Input FB 018 byte file                               
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                 
  OPTION COPY                                                   
  JOINKEYS F1=VB254,FIELDS=(5,16,A)                             
  JOINKEYS F2=FB018,FIELDS=(1,16,A)                             
  REFORMAT FIELDS=(F1:1,4,?,F1:63,1,5)                           
  JOIN UNPAIRED,F1                                               
  INREC BUILD=(01,04,                          $ RDW             
               07,58,                          $ DATA TILL CHANGE
               63:05,02,CHANGE=(1,C'B3',C'6',  $ FLAG "3" TO "6"   
                                  C'B5',C'8',  $ FLAG "5" TO "8"     
                                  C'B6',C'9'), $ FLAG "6" TO "9"     
               NOMATCH=(65,1),                 $ FLAG AS IS     
               66)                             $ REST OF DATA   
//*                                                             
//JNF2CNTL DD *                                                 
  INREC IFTHEN=(WHEN=INIT,BUILD=(4,7,12,6,C'0101010100')),       
        IFTHEN=(WHEN=INIT,OVERLAY=(8:8,16,ZD,PD,LENGTH=9))       
//* 
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Nov 05, 2014 3:36 pm    Post subject: Reply with quote

Hi Kolusu,

an error we are getting

Code:

ICE084I 0 EXCP ACCESS METHOD USED FOR SORTOUT                         
ICE218A 3 55 BYTE VARIABLE RECORD IS SHORTER THAN 65 BYTE MINIMUM FOR 
ICE751I 1 EF-K49535 F0-K66716 E8-K61438                               
ICE052I 0 END OF DFSORT                                               


Regards,
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 05, 2014 3:46 pm    Post subject: Reply with quote

Magesh_J,

Looks like you have short records. Use the following control cards. I also optimized the JNF2 a little bit.

Code:

//SYSIN    DD *                                                     
  OPTION COPY                                                       
  JOINKEYS F1=VB254,FIELDS=(5,16,A)                                 
  JOINKEYS F2=FB018,FIELDS=(1,16,A)                                 
  REFORMAT FIELDS=(F1:1,4,?,F1:63,1,5)                             
  JOIN UNPAIRED,F1                                                 
  INREC IFTHEN=(WHEN=(1,2,BI,GE,65),                               
        BUILD=(01,04,                          $ RDW               
               07,58,                          $ DATA TILL CHANGE   
               63:05,02,CHANGE=(1,C'B3',C'6',  $ FLAG "3" TO "6"   
                                  C'B5',C'8',  $ FLAG "5" TO "8"   
                                  C'B6',C'9'), $ FLAG "6" TO "9"   
               NOMATCH=(65,1),                 $ FLAG AS IS         
               66)),                           $ REST OF DATA       
  IFTHEN=(WHEN=NONE,BUILD=(1,4,7))             $ SHORT RECORDS     
//*                                                                 
//JNF1CNTL DD *                                                     
  OPTION VLSHRT,DYNALLOC=(,32)                                     
//*                                                                 
//JNF2CNTL DD *                                                     
  INREC IFOUTLEN=16,                                               
        IFTHEN=(WHEN=INIT,BUILD=(4,7,12,6,C'0101010100')),         
        IFTHEN=(WHEN=INIT,OVERLAY=(8:8,16,ZD,PD,LENGTH=9))         
//*
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Nov 05, 2014 3:54 pm    Post subject: Reply with quote

Same error Sad
Code:

********************************* TOP OF DATA **********************************
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 12:49 ON WED NO
             OPTION COPY                                                       
             JOINKEYS FILE=F1,FIELDS=(5,16,A)                                   
             JOINKEYS FILE=F2,FIELDS=(1,16,A)                                   
             REFORMAT FIELDS=(F1:1,4,?,F1:63,1,5)                               
             JOIN UNPAIRED,F1                                                   
             INREC BUILD=(01,04,                                               
                          07,58,                                               
                          63:05,02,CHANGE=(1,C'B3',C'6',                       
                                             C'B5',C'8',                       
                                             C'B6',C'9'),                       
                          NOMATCH=(65,1),                                       
                          66)                                                   
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2                 
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR SORTJNF1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR SORTJNF2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=V, LENGTH=256                                   
ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE751I 0 C5-K90025 C6-K90025 C7-K54603 C8-K62201 E9-K60823 C9-BASE   E5-K62201
ICE193I 0 ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED
ICE089I 0 JOINKEYS.S1      .        , INPUT LRECL = 256, TYPE = V               
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)                                 
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6234096,6234096)                           
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=2097152,MINLIM=450560,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
ICE235I 0 OPTIONS: NULLOUT=RC0                                                 
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTOUT                                   
ICE218A 3 55 BYTE VARIABLE RECORD IS SHORTER THAN 65 BYTE MINIMUM FOR          F
ICE751I 1 EF-K49535 F0-K66716 E8-K61438                                         
ICE052I 0 END OF DFSORT                                                         


Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 05, 2014 4:03 pm    Post subject: Reply with quote

Magesh_J wrote:
Same error Sad


Magesh_J,

I don't see you using the new INREC with IFTHEN statement. What did you update ? Just JNF1/JNF2?
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Nov 05, 2014 4:10 pm    Post subject: Reply with quote

Please find the below messages for the same job

Code:

ICE417I 0 THIS IS THE JOINKEYS F1 SUBTASK FOR SORTJNF1                         
ICE143I 0 BLOCKSET     SORT  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 12:49 ON WED NO
             OPTION VLSHRT,DYNALLOC=(,32)                                       
ICE146I 0 END OF STATEMENTS FROM JNF1CNTL - PARAMETER LIST STATEMENTS FOLLOW   
          SORT  FORMAT=BI,FIELDS=(5,16,A)                                       
          RECORD TYPE=F                                                         
          DEBUG NOABEND,ESTAE                                                   
          OPTION EQUALS,MSGPRT=ALL,LIST,NOCHECK,RESINV=0,DYNALLOC,SORTDD=JNF1,MS
                         DDN=JNF1JMSG,SORTIN=SORTJNF1                           
ICE201I H RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE751I 0 C5-K90025 C6-K90025 C7-K54603 C8-K62201 E9-K60823 C9-BASE   E5-K62201
ICE193I 0 ICEAM2 INVOCATION ENVIRONMENT IN EFFECT - ICEAM2 ENVIRONMENT SELECTED
ICE088I 0 JOINKEYS.S1      .        , INPUT LRECL = 254, BLKSIZE = 27998, TYPE =
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)                                 
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6234096,6234096)                           
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=Y,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=N,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=Y,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
ICE235I 0 OPTIONS: NULLOUT=RC0                                                 
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTJNF1                                 
ICE750I 0 DC 97643072 TC 0 CS DSVRR KSZ 20 VSZ 20                               
ICE752I 0 FSZ=97643072 BC  IGN=0 E  AVG=138 0  WSP=137806 C  DYN=28 53216       
ICE751I 1 D8-BASE   D4-K59451 EA-K57947 F1-K38900 E8-K61438                     
ICE091I 0 OUTPUT LRECL = 254, TYPE = V                                         
ICE055I 0 INSERT 0, DELETE 20830                                               
ICE054I 0 RECORDS - IN: 1000000, OUT: 0                                         
ICE134I 0 NUMBER OF BYTES SORTED: 97338842                                     
ICE253I 0 RECORDS SORTED - PROCESSED: 1000000, EXPECTED: 768843                 
ICE098I 0 AVERAGE RECORD LENGTH - PROCESSED: 97, EXPECTED: 127                 
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 30 , TRACKS USED: 0             
ICE199I 0 MEMORY OBJECT STORAGE USED = 0M BYTES                                 
ICE180I 0 HIPERSPACE STORAGE USED = 97240K BYTES                               
ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES                                   
ICE052I 0 END OF DFSORT                                                         


Code:

********************************* TOP OF DATA **********************************
ICE417I 0 THIS IS THE JOINKEYS F2 SUBTASK FOR SORTJNF2                         
ICE143I 0 BLOCKSET     SORT  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 0 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 12:49 ON WED NO
            INREC IFOUTLEN=16,                                                 
               IFTHEN=(WHEN=INIT,BUILD=(4,7,12,6,C'0101010100')),               
               IFTHEN=(WHEN=INIT,OVERLAY=(8:8,16,ZD,PD,LENGTH=9))               
ICE146I 0 END OF STATEMENTS FROM JNF2CNTL - PARAMETER LIST STATEMENTS FOLLOW   
          SORT  FORMAT=BI,FIELDS=(1,16,A)                                       
          RECORD TYPE=F                                                         
          DEBUG NOABEND,ESTAE                                                   
          OPTION EQUALS,MSGPRT=ALL,LIST,NOCHECK,RESINV=0,DYNALLOC,SORTDD=JNF2,MS
                         DDN=JNF2JMSG,SORTIN=SORTJNF2                           
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1                         
ICE751I 0 C5-K90025 C6-K90025 C7-K54603 C8-K62201 EE-K51707 E9-K60823 C9-BASE   
ICE193I 0 ICEAM2 INVOCATION ENVIRONMENT IN EFFECT - ICEAM2 ENVIRONMENT SELECTED
ICE088I 1 JOINKEYS.S1      .        , INPUT LRECL = 80, BLKSIZE = 4096, TYPE = F
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)                                 
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6234096,6234096)                           
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=Y,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=N,WRKREL=Y,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMI
ICE235I 0 OPTIONS: NULLOUT=RC0                                                 
ICE084I 1 VSAM ACCESS METHOD USED FOR SORTJNF2                                 
ICE750I 0 DC 232390320 TC 0 CS DSVNN KSZ 20 VSZ 20                             
ICE752I 0 FSZ=2904879 RC  IGN=0 E  AVG=20 0  WSP=75458 C  DYN=0 0               
ICE751I 1 DE-K61785 D5-K62201 D3-BASE   D7-BASE   E8-K61438                     
ICE091I 0 OUTPUT LRECL = 16, TYPE = F                                           
ICE055I 0 INSERT 0, DELETE 1320747                                             
ICE054I 0 RECORDS - IN: 2904879, OUT: 0                                         
ICE134I 0 NUMBER OF BYTES SORTED: 232390320                                     
ICE253I 0 RECORDS SORTED - PROCESSED: 2904879, EXPECTED: 2904879               
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 0 , TRACKS USED: 0             
ICE199I 0 MEMORY OBJECT STORAGE USED = 0M BYTES                                 
ICE180I 0 HIPERSPACE STORAGE USED = 57300K BYTES                               
ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES                                   
ICE052I 0 END OF DFSORT




Is it possible to check this code.

Code:

//SYSIN    DD *                                                   
   OPTION COPY                                                     
   JOINKEYS FILE=F1,FIELDS=(5,16,A)                               
   JOINKEYS FILE=F2,FIELDS=(1,16,A)                               
   REFORMAT FIELDS=(F1:1,4,?,F1:5)                                 
   JOIN UNPAIRED,F1                                               
   INREC IFTHEN=(WHEN=(64,1,CH,EQ,C'3',AND,5,1,CH,EQ,C'B'),       
              OVERLAY=(64:C'6')),                                 
             IFTHEN=(WHEN=(64,1,CH,EQ,C'5',AND,5,1,CH,EQ,C'B'),   
              OVERLAY=(64:C'8')),                                 
             IFTHEN=(WHEN=(64,1,CH,EQ,C'6',AND,5,1,CH,EQ,C'B'),   
              OVERLAY=(64:C'9'))                                   
  OUTFIL BUILD=(1,4,6)                                             
//*                                                               
//JNF2CNTL DD *                                                   
  INREC IFOUTLEN=16,                                               
     IFTHEN=(WHEN=INIT,BUILD=(4,7,12,6,C'0101010100')),           
     IFTHEN=(WHEN=INIT,OVERLAY=(8:8,16,ZD,PD,LENGTH=9))           
//*                                                               


thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 05, 2014 4:18 pm    Post subject: Reply with quote

Magesh_J wrote:
Please find the below messages for the same job


Magesh_J,

I am missing something here. My response to your Initial ICE218A message was to use INREC IFTHEN on the main task. I haven't yet seen you using that control cards. You are showing me the Subtask JNF1 and JNF2 messages.

Did you copy these control cards as is shown here?

http://www.mvsforums.com/helpboards/viewtopic.php?p=60502#60502
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Nov 05, 2014 4:35 pm    Post subject: Reply with quote

Dear Kolusu,

Really sorry for the inconvenience,
it is working great and I missed it and Thank you very much

But a challenge we have, Job I submitted is a sample input file.
Original input file is 400 million records, will the workspace would be challenge (VB/254) file

Thanks
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 05, 2014 4:40 pm    Post subject: Reply with quote

Magesh_J wrote:
Dear Kolusu,

Really sorry for the inconvenience,
it is working great and I missed it and Thank you very much


Glad you got it working.

Magesh_J wrote:

But a challenge we have, Job I submitted is a sample input file.
Original input file is 400 million records, will the workspace would be challenge (VB/254) file


Well you can specify Dyanlloc for a max of 255 sortwork datasets. So change JNF1CNTL to have 125 and then keep increasing it if you run into an error.
Code:

//JNF1CNTL DD *                                                     
  OPTION VLSHRT,DYNALLOC=(,125) 


Btw do you really need to match on the first 7 bytes of character data? Is it always a constant "CCCCCCC" or does it vary? If it is constant then we pretty much can eliminate it from the match key.

Also don't forget to add REGION=0M for this step.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Magesh_J
Intermediate


Joined: 21 Jun 2014
Posts: 259
Topics: 54

PostPosted: Wed Nov 05, 2014 4:52 pm    Post subject: Reply with quote

Kolusu,

1. CCCCCCC is not standard it varies.
2. code is running without OPTION VLSHRT, do we really need to include this.
3. Is there anyway we can get a summary report of these changes in a separate file.
Example
Code:

Key value                 old  new
CCCCCCC 1234560101010100   5   8
CCCCCCC 1234570101010100   6   9


Regards,
Magesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 05, 2014 5:16 pm    Post subject: Reply with quote

Magesh_J wrote:
Kolusu,

1. CCCCCCC is not standard it varies.
2. code is running without OPTION VLSHRT, do we really need to include this.

Magesh_J,

I usually test it for all kinds of error situations and I had short records. I just added it to pad the short records. If you think your Input VB file will ALWAYS have at least 16 bytes then you don't need VLSHRT.

Magesh_J wrote:

3. Is there anyway we can get a summary report of these changes in a separate file.
Example
Code:

Key value                 old  new
CCCCCCC 1234560101010100   5   8
CCCCCCC 1234570101010100   6   9


Yes it is quite simple. You just need to move the INREC to OUTFIL as you need separate files. Use the following control cards which will give you the desired results.

Code:

//SORTOUT  DD SYSOUT=* 
//RPT      DD SYSOUT=* 
//SYSIN    DD *                                                     
  OPTION COPY                                                       
  JOINKEYS F1=VB254,FIELDS=(5,16,A)                                 
  JOINKEYS F2=FB018,FIELDS=(1,16,A)                                 
  REFORMAT FIELDS=(F1:1,4,?,F1:63,1,5)                             
  JOIN UNPAIRED,F1                                         
       
  OUTFIL IFTHEN=(WHEN=(1,2,BI,GE,65),                               
          BUILD=(01,04,                          $ RDW             
                 07,58,                          $ DATA TILL CHANGE
                 63:05,02,CHANGE=(1,C'B3',C'6',  $ FLAG "3" TO "6" 
                                    C'B5',C'8',  $ FLAG "5" TO "8" 
                                    C'B6',C'9'), $ FLAG "6" TO "9" 
                 NOMATCH=(65,1),                 $ FLAG AS IS       
                 66)),                           $ REST OF DATA     
         IFTHEN=(WHEN=NONE,BUILD=(1,4,7))        $ SHORT RECORDS   
                                                                   
  OUTFIL FNAMES=RPT,INCLUDE=(5,2,SS,EQ,C'B3,B5,B6'),VTOF,           
  BUILD=(7,7,                                                       
         X,                                                         
         14,9,PD,M11,LENGTH=17,                                     
         3X,                                                       
         05,02,CHANGE=(6,C'B3',C'3    6',                           
                         C'B5',C'5    8',                           
                         C'B6',C'6    9')),                         
  HEADER1=('      KEY VALUE           OLD  NEW',/,                 
           '------------------------- ---  ---')                   
//*                                                                 
//JNF1CNTL DD *                                                     
  OPTION DYNALLOC=(,32)                                     
//*                                                                 
//JNF2CNTL DD *                                                     
  INREC IFOUTLEN=16,                                               
        IFTHEN=(WHEN=INIT,BUILD=(4,7,12,6,C'0101010100')),         
        IFTHEN=(WHEN=INIT,OVERLAY=(8:8,16,ZD,PD,LENGTH=9))         
//*


The RPT will contain a 35 byte FB file which looks like this
Code:

      KEY VALUE           OLD  NEW
------------------------- ---  ---
CCCCCCC 01234560101010100   3    6

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
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 1, 2  Next
Page 1 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