Add * to the matched record



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

Re: Add * to the matched record

Postby skolusu » Thu Aug 18, 2011 9:57 pm

Kitz wrote:I can say this worked partially, but for some test cases it did not worked. I trying to figure out what could be the problem. I will provide that test data by today evening which probably, you can better say what is going wrong.


The job I posted should have worked in all scenarios . Show me the error data and explain why you think it is an error.

Kitz wrote:Additionally, I was also trying to work out a simple solution for this. In my trial, I was just working out with your first solution. Strangely, our scheduler is not recognising the '?' in REFORMAT FIELDS=(F1:1,40,?). Please advise is there any other alternative for this?


I would love to see the simpler solution. Most JCL checker software are way beyond keeping up with the latest features of DFSORT and you should ignore those errors if you are running DFSORT and your shop have the latest PTF's installed which supports the ? on Joinkeys. If you are running Syncsort, then you need to find someone else to help you as I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.

Run the following Job and post the complete sysout , so that we can determine the level of DFSORT you running

//S1 EXEC PGM=ICEMAN
//SYSOUT   DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DUMMY
//SYSIN   DD   *
  OPTION COPY
/*
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: Add * to the matched record

Postby Kitz » Fri Aug 19, 2011 5:27 pm

Thanks a lot Kolusu.

I cannot copy the sysout here, it looks its blocked for copy and paste from my location.

Sorry to trouble you. Please advise is there any particular in the sysout you are interest so that I can type them accross. Few points from sysout is:
Z/OS DFSORT V1R10
BSAM access method used

I projected to my managed about your first simple solution and they were okay with this. Your first solutions works perfectly outside the scheduler. But, here we are using TWS scheduler 8.5.1. The scheduler does not recognise '?' and it doesn't get into schedule. I am using Joinkeys from longtime here and it works okay in the scheduler. But, not sure why '?' does not work?

The second solution works very well but for 2 test cases it did not work. I am currently in process to get the test data. I will update you asap on this test data.

Thanks & Regards,
Kitz
Kitz
 
Posts: 47
Joined: Thu Mar 17, 2011 3:46 am
Has thanked: 0 time
Been thanked: 1 time

Re: Add * to the matched record

Postby BillyBoyo » Fri Aug 19, 2011 5:53 pm

Kitz,

For me, you should never have "cards" in a production PROC, or in the JCL which invokes it, save for exceptional situations.

If your sort cards were in a member of a PDS for sort cards which related to your project you'd avoid this problem, you'd have better documentation, and you'd have all the stuff in one place for review/amendment.

Try to set it up for the scheduler with a member on a PDS containing the sort cards, see if that does it.

Also, can you post the message similar to this one, "ICE201I H RECORD TYPE...", please.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Add * to the matched record

Postby Kitz » Wed Aug 24, 2011 8:39 pm

Thanks a lot Billy. When I used sort cards on a PDS it worked. That's funny, I think TWS doesn't like passing some sort cards through SYSIN.

Kolusu,
The first solution which you have provided had worked and it was decided to go ahead with your first solution.

Sorry, the second solution had a fantastic approach. But, as I mentioned earlier that for some test data it doesn't recognise it. I now realized that if the wild card is last three characters (of 1-8th position) then the sort is not recognising it.
1st file
PARDA001 aaaaaaaaaaaaaaaaaaaaaaa
PBCCA002 aaaaaaaaaaaaaaaaaaaaaaa
PLUAK005 aaaaaaaaaaaaaaaaaaaaaaa
PWPAK022 aaaaaaaaaaaaaaaaaaaaaaa

2nd file
PAR
PLUAK
PVRLK
56D
022

Output is:
PARDA001* aaaaaaaaaaaaaaaaaaaaaaa
PBCCA002 aaaaaaaaaaaaaaaaaaaaaaa
PLUAK005* aaaaaaaaaaaaaaaaaaaaaaa
PWPAK022 aaaaaaaaaaaaaaaaaaaaaaa

Thanks & Regards,
Kitz
Kitz
 
Posts: 47
Joined: Thu Mar 17, 2011 3:46 am
Has thanked: 0 time
Been thanked: 1 time

Re: Add * to the matched record

Postby skolusu » Wed Aug 24, 2011 9:49 pm

Kitz,

If you want the validate both leading and trailing 3 bytes as key then you need to expand the concatenation list to 21 times. You need to test for the following combinations.

POS LEN  POS LEN  POS LEN  POS LEN  POS LEN  POS LEN
01   03  01   04  01   05  01   06  01   07  01   08   
02   03  02   04  02   05  02   06  02   07           
03   03  03   04  03   05  03   06                     
04   03  04   04  04   05                             
05   03  05   04                                       
06   03                                               


so concatenate your input file 21 times like shown earlier and use the following control cards
//SYSIN    DD *                                                     
  JOINKEYS F1=INA,FIELDS=(51,8,A)                                   
  JOINKEYS F2=INB,FIELDS=(1,8,A)                                     
  JOIN UNPAIRED,F1                                                   
  REFORMAT FIELDS=(F1:1,58,?,F2:1,8)                                 
  SORT FIELDS=(1,8,CH,A,59,1,CH,A),EQUALS                           
                                                                     
  OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(60:SEQNUM,8,ZD,RESTART=(1,8))), 
  IFTHEN=(WHEN=GROUP,BEGIN=(60,8,ZD,EQ,1),PUSH=(59:59,1,41,2)),     
  IFTHEN=(WHEN=(59,1,CH,EQ,C'B'),OVERLAY=(9:C'*'))                   
  OUTFIL BUILD=(1,40),                                               
  OMIT=(1,3,CH,EQ,C'$$$',OR,                                         
        59,1,SS,EQ,C'B,1',AND,(60,2,CH,NE,41,2,CH))                 
//JNF1CNTL DD *                                                     
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,3,CH,EQ,C'$$$'),                 
  PUSH=(41:ID=2,SEQ=8)),                                             
  IFTHEN=(WHEN=(41,2,ZD,EQ,01),OVERLAY=(51:1,3)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,02),OVERLAY=(51:1,4)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,03),OVERLAY=(51:1,5)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,04),OVERLAY=(51:1,6)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,05),OVERLAY=(51:1,7)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,06),OVERLAY=(51:1,8)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,07),OVERLAY=(51:2,3)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,08),OVERLAY=(51:2,4)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,09),OVERLAY=(51:2,5)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,10),OVERLAY=(51:2,6)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,11),OVERLAY=(51:2,7)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,12),OVERLAY=(51:3,3)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,13),OVERLAY=(51:3,4)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,14),OVERLAY=(51:3,5)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,15),OVERLAY=(51:3,6)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,16),OVERLAY=(51:4,3)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,17),OVERLAY=(51:4,4)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,18),OVERLAY=(51:4,5)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,19),OVERLAY=(51:5,3)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,20),OVERLAY=(51:5,4)),                   
  IFTHEN=(WHEN=(41,2,ZD,EQ,21),OVERLAY=(51:6,3))                     
//*
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: Add * to the matched record

Postby Kitz » Thu Aug 25, 2011 4:14 pm

Thanks a lot Kolusu. That worked perfectly.

Thanks & Regards,
Kitz
Kitz
 
Posts: 47
Joined: Thu Mar 17, 2011 3:46 am
Has thanked: 0 time
Been thanked: 1 time

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post