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
 

 

MAXLIMIT data with zero observation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
pravinj

New User


Joined: 10 Jun 2008
Posts: 24
Location: india

PostPosted: Mon Mar 16, 2009 1:31 pm    Post subject: MAXLIMIT data with zero observation
Reply with quote

Hi,

I read a file which contains the totals f each category and the logic is to evaluate that when the totals are less than a particular value read from another file, it'll be writing the error details in another file. My question is here when the input file-totals with 0 observations is read, how the logic above will get executed? Will it be executed every time it evaluates against the null value?

Code:
DATA BMPCOUNT;                     
INFILE BMPCNT FIRSTOBS = 1 OBS = 1;
INPUT @001 TOTCNT 10.             
;                                 

DATA MAXLIMIT;                     
INFILE MAXLMT FIRSTOBS = 1 OBS = 1;
INPUT @001 MAX_COUNT 4.           
      @008 MAX_PERCENT 3.         
;                                 
DATA MAXCNT;                                       
  SET BMPCOUNT;                                     
  SET MAXLIMIT;                                     
  SET TABLE_NM;                                     
   HIGH_PERCENT = MAX_COUNT * ( MAX_PERCENT / 100 );
   H_PERCENT_RND = ROUND(HIGH_PERCENT);             
   IF TOTCNT > HIGH_PERCENT THEN                   
    FILE MAILRPT;                                 


I tested it with MAXLIMIT data with zero observation, but the above condition evaluates to false. But i felt that as the high_percent calculated will be null, and if it's evaluated with TOTCNT, the condition will be returning true! How does this work?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7931
Location: Bellevue, IA

PostPosted: Mon Mar 16, 2009 5:26 pm    Post subject:
Reply with quote

Quote:
But i felt that as the high_percent calculated will be null, and if it's evaluated with TOTCNT, the condition will be returning true!
If you actually print the values in MAXCNT after the 3 SET statements you may find the values are not what you believe them to be.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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