IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Explain what ICETOOL will do for trailer count


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
esaccy
Currently Banned

New User


Joined: 19 Feb 2005
Posts: 22

PostPosted: Fri May 27, 2011 2:37 pm
Reply with quote

Hi,
Can you please explain what this JCL will do

Code:
STEP0010 EXEC PGM=ICETOOL,COND=(0,NE)         
*                                             
         INCLUDE MEMBER=SLBDFSRT               
*                                             
TOOLMSG  DD  SYSOUT=*                         
DFSMSG   DD  SYSOUT=*                         
TOOLIN   DD  DSN=ALC.ACPD.PARMLIB(DCZUP03A),   
             DISP=SHR                         
CTL1CNTL DD  DSN=ALC.ACPD.PARMLIB(DCZUP03B),   
             DISP=SHR                         
CTL2CNTL DD  DSN=ALC.ACPD.PARMLIB(DCZUP03C),   
             DISP=SHR                         
*                                             
INFILE   DD  DSN=&HLQ..CZ.PDCZTR01.S010F01(0),
             DISP=SHR                         
*                                             
OUTFIL1  DD  DSN=&&TEMP01,                     
             DISP=(,PASS),                     
             UNIT=SYSDA,                       
             SPACE=(TRK,(1,1),RLSE)           
*                                             
SYSIN    DD  DUMMY                             
SYSPRINT DD  SYSOUT=*                   
IOCOUNTS DD  SYSOUT=*,OUTLIM=1000       
SYSOUT   DD  SYSOUT=*                   
ABENDAID DD  SYSOUT=*                   
SYSUDUMP DD  SYSOUT=*                   
SNAPSHOT DD  SYSOUT=*                   


Code:

TOOLIN   is
 COPY FROM(INFILE) USING(CTL1)       
 COUNT FROM(OUTFIL1) EMPTY USING(CTL2)

CTL1CNTL   is
  OUTFIL FNAMES=OUTFIL1,REMOVECC,NODETAIL,   
   TRAILER1=(12,6,7:COUNT-1=(M11,LENGTH=6))

CTL2CNTL   is
   INCLUDE COND=(5,6,ZD,EQ,11,6,ZD)


Colour change from something barely visible to use the code tags instead - Expat
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 27, 2011 2:44 pm
Reply with quote

Set return code 0 if count of the detail records(excluding trailer record) in the input file matches with count value in the trailer record else set return code 12...


<<looks sombody has been kind to reformat above to understand it better.. icon_smile.gif ..But I was expecting this from OP itself as being 6 year old to this forum.. icon_sad.gif >>
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 27, 2011 2:47 pm
Reply with quote

Ohhh.. Its .. Expat...
Back to top
View user's profile Send private message
esaccy
Currently Banned

New User


Joined: 19 Feb 2005
Posts: 22

PostPosted: Fri May 27, 2011 3:04 pm
Reply with quote

Thanks.
Can you please suggest the segment what does
TRAILER1=(12,6,7:COUNT-1=(M11,LENGTH=6))
mean for
?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri May 27, 2011 4:03 pm
Reply with quote

Try to look back at this week's postings, a very similar thing came up, I suspect it will give you what you want.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 27, 2011 4:38 pm
Reply with quote

esaccy wrote:
Thanks.
Can you please suggest the segment what does
TRAILER1=(12,6,7:COUNT-1=(M11,LENGTH=6))
mean for
?


I suggest you read through complete DFSORT book but for now here is the link for outfil trailer
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG50/2.6.8.3?DT=20100628091856
Back to top
View user's profile Send private message
esaccy
Currently Banned

New User


Joined: 19 Feb 2005
Posts: 22

PostPosted: Mon May 30, 2011 9:32 pm
Reply with quote

Hi

I have read the lik\nk ,but still some help is needed for me.

from the below
CTL1CNTL is
OUTFIL FNAMES=OUTFIL1,REMOVECC,NODETAIL,
TRAILER1=(12,6,7:COUNT-1=(M11,LENGTH=6))

CTL2CNTL is
INCLUDE COND=(5,6,ZD,EQ,11,6,ZD)

I can understand count-1 ,that is giving the count of the records excluding trailer and in M11 format.

But i cant understand why TRAILER1=(12,6 is there?

Another thing the
INCLUDE COND=(5,6,ZD,EQ,11,6,ZD) is also not understood

Can anybody please explain this
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 31, 2011 2:24 am
Reply with quote

Quote:

But i cant understand why TRAILER1=(12,6 is there?

You already have count at 12,6 in trailer record which you are trying to validate.

Quote:

Another thing the
INCLUDE COND=(5,6,ZD,EQ,11,6,ZD) is also not understood

Can anybody please explain this

What you dont understand here?
Back to top
View user's profile Send private message
esaccy
Currently Banned

New User


Joined: 19 Feb 2005
Posts: 22

PostPosted: Tue May 31, 2011 10:29 am
Reply with quote

Please find my i/p file.

"Mr","Doctra","jkascscaj","isccsl",jdhdj"
"Mr","sbjs","bjjwfk","bjsjsc","bjscjscxx"
"Mr","fjwj","bjccbb","bdhjjk","ndjdjdbn"
TRAILER000003


(1)Can you plesase explain how TRAILER1=(12,6 is taken,
I think only if we know the count is single digit then we can go for 12,6.Please clarify.

(2)Then
INCLUDE COND=(5,6,ZD,EQ,11,6,ZD)
Why 5,6 and 11,6 positions are compared for ? Please clarify this also
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue May 31, 2011 11:12 am
Reply with quote

Hi,

is your input file FB or VB.

If VB you need to add 4 bytes for the RDW.

Also, check what's written to OUTFIL1, this will assist you immensely.

Gerry
Back to top
View user's profile Send private message
esaccy
Currently Banned

New User


Joined: 19 Feb 2005
Posts: 22

PostPosted: Tue May 31, 2011 1:08 pm
Reply with quote

Hi
My file is FB file

I am totally confused with the positions they have used
TRAILER1=(12,6

Can you please help
Back to top
View user's profile Send private message
esaccy
Currently Banned

New User


Joined: 19 Feb 2005
Posts: 22

PostPosted: Tue May 31, 2011 1:20 pm
Reply with quote

Hi
Can anybody explain What the fiollowing will do general


TOOLIN is
COPY FROM(INFILE) USING(CTL1)
COUNT FROM(OUTFIL1) EMPTY USING(CTL2)

CTL1CNTL is
OUTFIL FNAMES=OUTFIL1,REMOVECC,NODETAIL,
TRAILER1=(12,6,7:COUNT-1=(M11,LENGTH=6))

CTL2CNTL is
INCLUDE COND=(5,6,ZD,EQ,11,6,ZD)


Because i am confused what TRAILER1=(12,6,7:COUNT-1=(M11,LENGTH=6)) will do? I assume it will fetch the six characters from position 12 of input file and then from 7th chjaracter it will print the count of records in 6chars(excluding trailer).
But According to my i/p file it is not correct.
Can anybode also explain what
INCLUDE COND=(5,6,ZD,EQ,11,6,ZD) will do at this point(i.e after trailer1)
Back to top
View user's profile Send private message
Guest







PostPosted: Tue May 31, 2011 1:41 pm
Reply with quote

Hi,
Consider this as the input for this sort job:
Code:

H               
A               
B               
5               
T0000000000000004


The CTL1 will produce the following output:
Code:

000004000004


if the CTL2 was coded as
Code:

INCLUDE COND=(1,6,ZD,EQ,7,6,ZD)


the RC will be 0 since the resulting criteria is met

if the CTL2 was coded as
Code:

INCLUDE COND=(1,6,ZD,NE,7,6,ZD)


the RC will be 12

I believe the sort card was written for VB file icon_smile.gif or might be my guess is wrong....

Devil13
Back to top
esaccy
Currently Banned

New User


Joined: 19 Feb 2005
Posts: 22

PostPosted: Tue May 31, 2011 4:02 pm
Reply with quote

Thanks a lot devil13

I also beleive there might be a wrror in type.it should be VB

Thanks for clearing my doubt in a more simpler way
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top