Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Strange Results with ICETOOL

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

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Tue Dec 22, 2015 4:12 am    Post subject: Strange Results with ICETOOL
Reply with quote

I have below Sort step running in production and I have seen some records are dropped during the sort process from file1 which they shouldn't have based on their actual file1 values. So to verify , I ran all the same steps with production files in Development region and I got the correct results which means no records got dropped but production one has missing records. What could have gone wrong , any idea?

Code:
//PS02    EXEC PGM=ICETOOL                                           
//IN1       DD DSN=file1
//IN2       DD DSN=file2         
//          DD DSN=file3
//IN3       DD DSN=file4           
//TEMP2     DD DSN=&&TEMP2,DISP=(MOD,PASS),                         
//             UNIT=SYSDA,SPACE=(CYL,(100,100),RLSE)                 
//TEMP3     DD DSN=&&TEMP3,DISP=(MOD,PASS),                         
//             UNIT=SYSDA,SPACE=(CYL,(100,100),RLSE)                 
//TEMP4     DD DSN=&&TEMP4,DISP=(MOD,PASS),                         
//             UNIT=SYSDA,SPACE=(CYL,(100,100),RLSE)                 
//TEMP5     DD DSN=&&TEMP5,DISP=(MOD,PASS),                         
//             UNIT=SYSDA,SPACE=(CYL,(100,100),RLSE)                 
//OUT1      DD DSN=filr5,             
//             DISP=(NEW,CATLG,DELETE),                             
//             UNIT=SYSDA,VOL=SER=AAA01
//TOOLMSG   DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//SYSPRINT  DD SYSOUT=*
//SYSOUT    DD SYSOUT=*
//SYSABOUT  DD SYSOUT=*
//SYSDBOUT  DD SYSOUT=*
//TOOLIN    DD DSN=pds(mem1),DISP=SHR
//CTL1CNTL  DD DSN=pds(mem2),DISP=SHR
//CTL2CNTL  DD DSN=pds(mem3),DISP=SHR
//CTL3CNTL  DD2DSN=pds(mem4),DISP=SHR
//CTL4CNTL  DD DSN=pds(mem5),DISP=SHR
//CTL5CNTL  DD DSN=pds(mem6),DISP=SHR

pds(mem1)-
SORT FROM(IN1)   TO(TEMP2)  USING(CTL1)
SORT JKFROM      TO(TEMP3)  USING(CTL2)
SORT FROM(TEMP3) TO(TEMP4)  USING(CTL3)
SORT FROM(IN3)   TO(TEMP5)  USING(CTL4)
SORT FROM(TEMP4) TO(TEMP5)  USING(CTL5)
SORT FROM(TEMP5) TO(OUT1)   USING(CTL4)
pds(mem2)-
SORT FIELDS=COPY                                         
INCLUDE COND=((3,3,CH,EQ,C'AAA'),AND,(3500,1,CH,NE,C' '))
OUTREC FINDREP=(IN=C'+',OUT=C' ')                             
pds(mem3)-                 
JOINKEYS F1=TEMP2,FIELDS=(2913,10,A)
JOINKEYS F2=IN2,FIELDS=(11,10,A)   
JOIN UNPAIRED,F1,ONLY               
REFORMAT FIELDS=(F1:1,7500)         
OPTION COPY
pds(mem4)
SORT FIELDS=COPY
OUTREC BUILD=(C'.......'                        )
pds(mem5)
SORT FIELDS=COPY
pds(mem6)
SORT FIELDS=COPY                   
INREC BUILD=(1,500,SQZ=(SHIFT=LEFT))


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

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Tue Dec 22, 2015 4:30 am    Post subject: Reply to: Strange Results with ICETOOL
Reply with quote

Why use a SORT operator with a USING which contains SORT FIELDS=COPY? Just use the COPY operator.

You are SORTing both files for the JOIN, do you need to? Why don't you have JNFnCNTL files for the JOIN put INCLUDE/OMIT COND= in there, and also, since you only need the keys for the F2, just BUILD the key,

The SORT of TEMP3 you could do in the JOINKEYS main task. I have no clue as to why you do the final SORT (COPY).

As to if/why records may be missing, we have nothing to go on, as there is no information of what is missing, or even the sysout from the step missing and with.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Tue Dec 22, 2015 9:35 pm    Post subject:
Reply with quote

I agree we can rewrite this better with your observation but do you see any strange could happen here and this in production since last 4 years? Conditions in mem2 and mem3 are satisfied for those 10 records which shouldn't have skipped from file to out1 in production. Input records count is around 12k. but the same things works fine in development region.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Wed Dec 23, 2015 2:30 am    Post subject: Reply to: Strange Results with ICETOOL
Reply with quote

As I said, no, not without further information.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Thu Dec 24, 2015 8:36 pm    Post subject:
Reply with quote

Thanks Bill.
It was a scheduling issue where the jobs are not scheduled properly. The file1 referenced above is created in job1 and the above step executes in job2Now in this case the Job1 ran 1 minute after job2 which then made job2 to refer file1's yesterday's generation where
Code:
3500,1,CH,NE,C' '
wasn't true hence the results and during the testing in development region I was using current (Today's generation of Job1) as this was how scheduled in production and now this has been corrected.
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 Weirdo results with JOINKEYS Balaryan DFSORT/ICETOOL 4 Wed Oct 18, 2017 9:04 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us