View previous topic :: View next topic |
Author |
Message |
Consultant Beginner
Joined: 21 Jan 2008 Posts: 5 Topics: 3
|
Posted: Sat Feb 02, 2008 7:24 pm Post subject: PL/I which declarationis efficient (Group or Individual)? |
|
|
Hi,
I am declaring the most variables with DCL statement in PL/I.If I combine all the decarations put under a group variable is it effiecient? Could anybody elaborate on this?
First Method:
------------
DCL WS_ABC CHAR(05);
---- -------- ---------
---- -------- ---------
DCL WS-XYZ CHAR(10);
ETC..
like
SECOND METHOD:
-----------------
DCL 1 OTHER_VARIABLES,
3 WS_ABC CHAR(05);
3--------- ---------;
3 WS_XYZ CHAR(10);
Thanks in advance.. |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Feb 04, 2008 5:39 am Post subject: |
|
|
Neither way is wrong or more efficient. Possibly using the first method may save a few bytes of storage as the compiler has more flexibility as to where to locate variables.
From an aesthetic point of view the first is preferable because the varables are not related (necessarily). I assume grouped variables to be related eg a record structure.
Of couse, the easiest and quickest way to find these things out is to try first and ask later. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Mon Feb 04, 2008 11:08 am Post subject: |
|
|
Consultant,
Please show enough courtesy to wait more than 3 minutes before posting the same question on a different bulletin board. _________________ ....Terry |
|
Back to top |
|
|
|
|