Page 1 of 1

UNION statement

PostPosted: Wed Jun 20, 2012 7:04 pm
by Alison Oliveira
Hi all,

in a UNION statement, can i put two types of variables, at the same UNION like this??

DCL 1 * UNION,               
      2 W_AUX      CHAR(001),
      2 W_AUX_BIT  BIT (001);


PL/I ENTERPRISE...

thanks

Re: UNION statement

PostPosted: Wed Jun 20, 2012 8:17 pm
by Akatsukami
Yes. Remember, though, that when you refer to the bit variable, the Enterprise compiler will generate instructions to set the "slack" (unused) bits of the character variable to '0'B;