Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reducing the number of Input file reads.

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

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Jul 24, 2009 3:32 pm    Post subject: Reducing the number of Input file reads.
Reply with quote

I have 5 ICETOOL steps one by one,with the same TOOLIN statement. (Same input and output files)
The include condition varies at
Code:
124,2,CH,EQ,C'XX'.


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
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Jul 24, 2009 4:21 pm    Post subject:
Reply with quote

I think Frank must be busy today 824.gif . Still no response icon_wink.gif icon_biggrin.gif

Anyways its not urgent.

Thanks & Regards,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 24, 2009 4:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Fri Jul 24, 2009 4:32 pm    Post subject: Reply to: Reducing the number of Input file reads.
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Jul 24, 2009 4:50 pm    Post subject:
Reply with quote

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. 2014.gif


Regards,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 24, 2009 4:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Fri Jul 24, 2009 4:57 pm    Post subject: Reply to: Reducing the number of Input file reads.
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Jul 24, 2009 5:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 24, 2009 5:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jul 24, 2009 9:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 24, 2009 9:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Sat Jul 25, 2009 1:33 am    Post subject:
Reply with quote

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. icon_keel.gif

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

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Sat Jul 25, 2009 1:47 am    Post subject:
Reply with quote

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.

Quote:
Inconsiderate
icon_sad.gif

Regards,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Jul 25, 2009 2:42 am    Post subject:
Reply with quote

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. icon_wink.gif

No harm done.

Dick seems to be getting a little testy lately. icon_sad.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Jul 25, 2009 8:18 am    Post subject: Reply to: Reducing the number of Input file reads.
Reply with quote

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. . . icon_redface.gif

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 icon_neutral.gif

d
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Jul 27, 2009 3:39 pm    Post subject:
Reply with quote

No problems D. icon_smile.gif

Hi Frank,

The code worked like a charm.. Really cool..

Now I will try understanding what the code actually does, step by step. icon_eyes.gif



Keep it going....
36_8_14.gif



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

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Jul 27, 2009 4:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Jul 27, 2009 8:48 pm    Post subject:
Reply with quote

You're welcome. Thanks for the feedback.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Jul 27, 2009 8:50 pm    Post subject:
Reply with quote

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
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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 17 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us