check the value of last byte in the variable



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

check the value of last byte in the variable

Postby Manju Venkat » Fri Mar 18, 2011 6:01 pm

Hi,

i want to check the last byte of the variable to the particular value. how can i do that? please anyone suggest me.
example:
01 ws-var pi x(10) value '12345'

i want to check whether last byte of ws-var is having the value 5 or not.
Manju Venkat
 
Posts: 16
Joined: Tue Mar 15, 2011 9:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: check the value of last byte in the variable

Postby BillyBoyo » Fri Mar 18, 2011 6:07 pm

I think you can think about it a little bit more first, can't you? You've just had an outline of some code looking at characters in something longer.

Plus, we have no idea of the parameters of your problem, so if you still can't get it, think of a better way to ask the question with more detail.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post