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

Meaning of Comma (,) in Easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
charlessxavier

New User


Joined: 12 Sep 2010
Posts: 4
Location: India

PostPosted: Thu Mar 08, 2012 7:54 pm
Reply with quote

Hello all,

I just encountered this code in one of my easytrieve programs

IF HBFM = 1, 7
WACK = WACK + 1
GO TO JOB
END-IF


Which is asking the control to skip the record and go to job...

But what does a COMMA (,) mean here ? is it OR ?

please help me with this
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: Thu Mar 08, 2012 8:52 pm
Reply with quote

WACK? OK, I'll leave it. Probably not your choice.

Have a look at "Field Series Condition" in your manual.

Yes, it is like an OR as far as the values in series are concerned. Or multiple identical IFs, except with a different value to match.

I've not used it, for the reason you have discovered. Someone looks at the code and just doesn't plain understand it. After a while, you realise it must be an "OR" of some sort, but not convinced until you hit the manual.

Easytrieve doesn't have an equivalent of 88s other than this. 88s is how you'd want to do it in Cobol.

I'd code out the ORs. At least any reader will understand when they see the code. I don't know what would happen if you have, say, three values but you miss the comma out for one of them. You could try, and let us know :-)
Back to top
View user's profile Send private message
charlessxavier

New User


Joined: 12 Sep 2010
Posts: 4
Location: India

PostPosted: Mon Mar 12, 2012 11:27 am
Reply with quote

Thanks a lot bill,


WACK is a variable for counting the number of records which satisfies the given condition, it is kind of acknowledgment variable...

And so if there are multiple values separated by Comas.. you mean to say the condition would be "either of" the values given.. right ?
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: Mon Mar 12, 2012 12:41 pm
Reply with quote

Yes. As you suspected, it is like an OR. Either of two values or any of more than two values and the test will be true.
Back to top
View user's profile Send private message
charlessxavier

New User


Joined: 12 Sep 2010
Posts: 4
Location: India

PostPosted: Mon Mar 12, 2012 12:44 pm
Reply with quote

Okay !!


Thanks a lot for helping out icon_smile.gif
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Count the number of characters in a f... CA Products 1
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
No new posts Easytrieve EZABX007 with error code 0... CA Products 7
No new posts Add Comma to each record until find t... DFSORT/ICETOOL 6
No new posts Converting SAS code to Cobol or Easyt... All Other Mainframe Topics 6
Search our Forums:

Back to Top