View previous topic :: View next topic
|
Author |
Message |
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
I have 5 ICETOOL steps one by one,with the same TOOLIN statement. (Same input and output files)
The include condition varies at
so the same input file is being read 5 times but with different include steps.
Is it possible to achieve this logic with just one single pass?.
(P.S. The output file is in disp=mod)
Please let me know if any more information is required.
Code: |
COUNT FROM(IN1) WRITE(OUT) TEXT('MD ') DIGITS(8) USING(CTL1)
INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
124,2,CH,EQ,C'01',AND,
1,8,CH,EQ,DATE1-1)
COUNT FROM(IN1) WRITE(OUT) TEXT('MD ') DIGITS(8) USING(CTL1)
INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
124,2,CH,EQ,C'02',AND,
1,8,CH,EQ,DATE1-1)
COUNT FROM(IN1) WRITE(OUT) TEXT('MD ') DIGITS(8) USING(CTL1)
INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
124,2,CH,EQ,C'03',AND,
1,8,CH,EQ,DATE1-1)
COUNT FROM(IN1) WRITE(OUT) TEXT('MD ') DIGITS(8) USING(CTL1)
INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
124,2,CH,EQ,C'04',AND,
1,8,CH,EQ,DATE1-1)
COUNT FROM(IN1) WRITE(OUT) TEXT('MD ') DIGITS(8) USING(CTL1)
INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
124,2,CH,EQ,C'05',AND,
1,8,CH,EQ,DATE1-1) |
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
I think Frank must be busy today . Still no response
Anyways its not urgent.
Thanks & Regards, |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Frank is in a different time zone, between 8 - 12 hours behind you.
What exactly are you doing, just getting counts of the number of records that fall into the different include statements. |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
Try using the below code. I have never used outfil with count operator.
1) use outfil files along with different include conditions.
Code: |
COUNT FROM(IN1) TEXT('MD ') DIGITS(8) USING(CTL1)
COPY FROM(TEMPOUT) TO (OUT) USING
CNTLCTL1
OUTFIL FILES=01,INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
124,2,CH,EQ,C'01',AND,
1,8,CH,EQ,DATE1-1)
OUTFIL FILES=02,INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
124,2,CH,EQ,C'02',AND,
1,8,CH,EQ,DATE1-1)
...
...
...
|
Define DD statements as :
Code: |
//SORTOF01 DD DSN=&&T1,
//SORTOF02 DD DSN=&&T2,
...
...
...
//TEMPOUT DD DSN=&&T1,DISP=(OLD,PASS)
DD DSN=&&T2,DISP=(OLD,PASS)
DD DSN=&&T3,DISP=(OLD,PASS)
DD DSN=&&T4,DISP=(OLD,PASS)
DD DSN=&&T5,DISP=(OLD,PASS)
|
Thanks,
-Kapil. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi, thanks for your time in this..
Quote: |
What exactly are you doing, just getting counts of the number of records that fall into the different include statements |
Yes, I just wanted to get the number of records only. For trend monitoring.
Hi Hikaps14,
I would try out your idea with the temp files and let you know if it works.
Regards, |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Try this, it will give you a count for each occurrence of a value in the field specified.
Code: |
//ICETOOL1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//INFILE DD DSN=Your input dataset,DISP=SHR
//OUFILE DD SYSOUT=*
//TOOLIN DD *
OCCURS FROM(INFILE) LIST(OUFILE) NOHEADER ON(124,2,CH) ON(VALCNT)
/*
|
|
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
Hi vasanthz,
I was trying to achieve the result desired by you, but I guess I messed it up.
I don't think its going to work. Sorry for the confusion.
Frank should be able to clarify our doubts.
Thanks,
-Kapil. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi Expat,
Thanks for ur time..
But all the 5 include conditions need to be included and the field (124,2,CH)has many values like SA,AS,GH,01,02,03,04,05,.....
I am looking to get the stats only for 01,02,03,04,05 alone.
Hikaps,
Quote: |
I don't think its going to work. Sorry for the confusion. |
Thanks for letting me know.
Regards, |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
This should get it down to two passes of the data, one pass of all data and one pass of the selected data.
But I have NOT tested this code
You could bite the bullet and look through the output from my original post and find only those 5 data types, which should all be grouped together.
Or wait for Frank to finish breakfast and get into the office
Code: |
//ICETOOL1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//INFILE DD DSN=Your input dataset,DISP=SHR
//INTEMP DD DSN=&&whatever,DISP=(,DELETE,DELETE),
// SPACE=(......),RECFM=xx,LRECL=yyy
//OUFILE DD SYSOUT=*
//TOOLIN DD *
COPY FROM(INFILE) TO(INTEMP) USING(CTL1)
OCCURS FROM(INTEMP) LIST(OUFILE) NOHEADER ON(124,2,CH) ON(VALCNT)
/*
//CTL1CNTL DD *
INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
1,8,CH,EQ,DATE1-1,AND,
(124,2,CH,EQ,C'01',OR,
124,2,CH,EQ,C'02',OR,
124,2,CH,EQ,C'03',OR,
124,2,CH,EQ,C'04',OR,
124,2,CH,EQ,C'05'))
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Vasanth,
If I understand what you want to do, the following one pass DFSORT/ICETOOL job would do it:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB)
//SORTOUT DD DSN=... output file (FB/11)
//SYSIN DD *
OPTION COPY
INCLUDE COND=(69,3,CH,EQ,C'SLA',AND,
124,2,SS,EQ,C'01,02,03,04,05',AND,
1,8,CH,EQ,DATE1-1)
INREC IFOUTLEN=11,
IFTHEN=(WHEN=(124,2,CH,EQ,C'01'),BUILD=(1:C'10000')),
IFTHEN=(WHEN=(124,2,CH,EQ,C'02'),BUILD=(1:C'01000')),
IFTHEN=(WHEN=(124,2,CH,EQ,C'03'),BUILD=(1:C'00100')),
IFTHEN=(WHEN=(124,2,CH,EQ,C'04'),BUILD=(1:C'00010')),
IFTHEN=(WHEN=(124,2,CH,EQ,C'05'),BUILD=(1:C'00001'))
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(C'MD ',TOT=(1,1,ZD,TO=ZD,LENGTH=8),/,
C'MD ',TOT=(2,1,ZD,TO=ZD,LENGTH=8),/,
C'MD ',TOT=(3,1,ZD,TO=ZD,LENGTH=8),/,
C'MD ',TOT=(4,1,ZD,TO=ZD,LENGTH=8),/,
C'MD ',TOT=(5,1,ZD,TO=ZD,LENGTH=8))
/*
|
Quote: |
Posted: Fri Jul 24, 2009 4:21 pm
I think Frank must be busy today . Still no response |
Yes, busy sleeping. 4:21pm in India would be 3:30am for me here in California. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I think Frank must be busy today . Still no response |
Suggest that waiting less than an hour before commenting is rather inappropriate and more than just a little inconsiderate. . .
You're quite fortunate you got a reply. . .
GM now recovering from rectal/cranial inversion. . . d |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi Frank,
Thanks, I will try your solution and let you know.
Hi D,
Quote: |
Suggest that waiting less than an hour before commenting is rather inappropriate and more than just a little inconsiderate. . . |
I was not chasing for a response, usually Frank responds immediately with a solution in DFSORT topic. No harm intended.
Thanks, |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
I think Frank must be busy today. Still no response |
I guess it was a bad joke. The smileys were there to say I was not serious with that words.
Regards, |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I was not chasing for a response, usually Frank responds immediately with a solution in DFSORT topic. No harm intended. |
I only code while sleeping on rare occasions.
No harm done.
Dick seems to be getting a little testy lately. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Vasanth,
Quote: |
I guess it was a bad joke. The smileys were there to say I was not serious with that words. |
No it was fine, I obviously mis-read - a peril of trying to do multiple things concurrently. . .
I do apologize.
Hi Frank,
Quote: |
Dick seems to be getting a little testy lately. |
Possibly, but not intentionally. Do help keep me straight if i sound too grumpy
d |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
No problems D.
Hi Frank,
The code worked like a charm.. Really cool..
Now I will try understanding what the code actually does, step by step.
Keep it going....
Thanks again, |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
I amended the program for 11 such variables. i.e(01,02,03,04,05,06,11,14,99)
and here are the results.
Code: |
Method SERV DISK CPU (SECS)
1 pass 3258 138 0.12
11 pass 24803 1458 0.81 |
Thanks for the new logic, |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You're welcome. Thanks for the feedback. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Possibly, but not intentionally. Do help keep me straight if i sound too grumpy |
We all get grumpy occasionally. You only seem to have a mild case. No big deal. |
|
Back to top |
|
|
|
|