Is an 88 level initialised when being set to true?
Posted: Tue Mar 05, 2013 3:38 pm
Hello,
Haven't done any coding for about 8 years, so I'm rather rusty! Just have a quick question about 88 levels, and I haven't been able to find a definitive answer in the manuals (although that may be down to my poor manual-trawling skills, rather then the information not being there!).
If I have a field with a couple of associated 88 levels thus:
04 ACTION-TYPE PIC X(6)
88 UPD VALUE 'UPDATE'
88 NEW VALUE 'NEW'
(I know that in this particular example I could use a PIC X and have 'U' and 'N' as values, but that doesn't work for my particular problem, nor would it particularly clear to someone reading it.)
If I code:
SET UPD TO TRUE
Then ACTION-TYPE contains 'UPDATE'
If later on, the code then goes though:
SET NEW TO TRUE
Does ACTION-TYPE get initialised first? I'd want ACTION-TYPE to contain 'NEW ', but I'm not 100% sure that it wouldn't contain 'NEWATE'.
If someone could confirm or deny it, I'd be grateful!
You know what? I could just write something and try it!
/slaps head
If anyone's got an answer, I'd appreciate it, particularly if there are 'exceptions to the rule', but meanwhile I'll go and knock something up.
Cheers!
DSP
Haven't done any coding for about 8 years, so I'm rather rusty! Just have a quick question about 88 levels, and I haven't been able to find a definitive answer in the manuals (although that may be down to my poor manual-trawling skills, rather then the information not being there!).
If I have a field with a couple of associated 88 levels thus:
04 ACTION-TYPE PIC X(6)
88 UPD VALUE 'UPDATE'
88 NEW VALUE 'NEW'
(I know that in this particular example I could use a PIC X and have 'U' and 'N' as values, but that doesn't work for my particular problem, nor would it particularly clear to someone reading it.)
If I code:
SET UPD TO TRUE
Then ACTION-TYPE contains 'UPDATE'
If later on, the code then goes though:
SET NEW TO TRUE
Does ACTION-TYPE get initialised first? I'd want ACTION-TYPE to contain 'NEW ', but I'm not 100% sure that it wouldn't contain 'NEWATE'.
If someone could confirm or deny it, I'd be grateful!
You know what? I could just write something and try it!
/slaps head
If anyone's got an answer, I'd appreciate it, particularly if there are 'exceptions to the rule', but meanwhile I'll go and knock something up.
Cheers!
DSP