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

How to give the condition variable value?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Wed Mar 12, 2008 9:42 pm
Reply with quote

I have two byte character variable like

05 ADDRESS-VAR PIC X(02) VALUE SPACES.
88 ADDRESS-NOT-PRSNT VALUE SPACES.
88 ADDRESS-PRSNT VALUE ????????????

I want the condition variable for checking that address is present or not present.

I can able to give spaces if there is no address, but how can i give the address-present variable value. It can come any combination of two alphabets.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Mar 12, 2008 10:06 pm
Reply with quote

IF NOT ADDRESS-NOT-PRSNT

The values for condition names are not variables.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Mar 12, 2008 10:54 pm
Reply with quote

Hi,

Does this solves Your problem?
Code:
05 ADDRESS-VAR PIC X(02) VALUE SPACES.
88 ADDRESS-NOT-PRSNT VALUE 'YY'.
88 ADDRESS-PRSNT VALUE 'NN'

Further, for this
Quote:
It can come any combination of two alphabets.
If You are checking just the 'presence of address', above definitions should work. Otherwise if you have a specific processing for each unique 'pattern' of alphabets (pattrens such as 'AB' is different than 'BA') then all such permutations (26P2, old maths) should be present at 88-level.
Back to top
View user's profile Send private message
Pons

New User


Joined: 25 May 2007
Posts: 61
Location: Coimbatore

PostPosted: Wed Mar 12, 2008 11:45 pm
Reply with quote

Thanks Giegerich and Anju.

Giegerich we cant use NOT verb. This is voilating our coading standard.

Anju What is that two alphabets are state code. So we cant use YY or NN.
I didn't get the the proper meaing of all such permutations (26P2, old maths). What is that.....
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Mar 13, 2008 12:13 am
Reply with quote

IF ADDRESS-NOT-PRSNT
CONTINUE
ELSE

END-IF.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 13, 2008 2:24 am
Reply with quote

Hello,

I'm Anuj not Anju..grin.. icon_evil.gif

Quote:
that two alphabets are state code
ok, then try on Craig's suggestion.

By permutation i meant AB, BA, AC, AD..BA,BC,BD..etc.... In 26P2, '26' shoubd be percepted as 'superscript' & '3' as subscript, I cann't show it that way here. This is the way they use it in Mathematics here in India & this is called as Permutaion-combination Chapter of Maths' book here, if people call it something else in other parts of world, I'm sorry I'm not aware of that. Further, 'P' is meant for Permutation, Permutaion is an old method to get all the arrangements when one need to select only some valuses (here 2 alphabets) out of many (26 letters of english aplhabets).

I hope You got the meaning of 26P2, if not leave it, & proceed with suggestion above. Your this sentence made me to think this
Quote:
It can come any combination of two alphabets.
I thought for every unique state code you've to execute something different.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top