MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PL/I which declarationis efficient (Group or Individual)?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Consultant
Beginner


Joined: 21 Jan 2008
Posts: 5
Topics: 3

PostPosted: Sat Feb 02, 2008 7:24 pm    Post subject: PL/I which declarationis efficient (Group or Individual)? Reply with quote

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
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Feb 04, 2008 5:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Mon Feb 04, 2008 11:08 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group