Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

What is DEFINED and what is the use of it in pl1 Declaration

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
malli419

New User


Joined: 16 Apr 2012
Posts: 5
Location: india

PostPosted: Wed Apr 25, 2012 3:28 pm    Post subject: What is DEFINED and what is the use of it in pl1 Declaration
Reply with quote

Hi am new to pl1 and and want to know the used of DEFINED keyword

Eg:DCL 1 IN_LOC DEFINED IN_REC
Back to top
View user's profile Send private message

PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2431
Location: Netherlands, Amstelveen

PostPosted: Wed Apr 25, 2012 3:31 pm    Post subject:
Reply with quote

The manuals will explain it all.
Back to top
View user's profile Send private message
senthilnathanj

New User


Joined: 31 Jul 2007
Posts: 47
Location: chennai

PostPosted: Wed Apr 25, 2012 3:47 pm    Post subject: Reply to: What is DEFINED and what is the use of it in pl1 D
Reply with quote

Hi,
The DEFINED attribute indicates that PL/I is not to allocate storage for the variable, but is to map the description of the variable onto the storage of another variable called the base variable. The DEFINED attribute provides a way to access the same data using different names .
Code:
DECLARE NAMES(10) CHARACTER(5) DEFINED (LIST),
        LIST(10) CHARACTER(5)

In this example, the variable NAMES is a defined variable; its data description is mapped to the storage occupied by the variable LIST. Any reference to NAMES or to LIST is resolved to the same location in memory.
Please correct me if i am wrong.
Back to top
View user's profile Send private message
malli419

New User


Joined: 16 Apr 2012
Posts: 5
Location: india

PostPosted: Wed Apr 25, 2012 4:00 pm    Post subject:
Reply with quote

Thanks dear
Back to top
View user's profile Send private message
malli419

New User


Joined: 16 Apr 2012
Posts: 5
Location: india

PostPosted: Wed Apr 25, 2012 4:04 pm    Post subject: Re: Reply to: What is DEFINED and what is the use of it in p
Reply with quote

Thank you
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1002
Location: Oostende, Belgium

PostPosted: Wed Apr 25, 2012 4:22 pm    Post subject:
Reply with quote

DEFINED is not deprecated (and won't be ever) , but using UNION is nowadays the preferred alternative and results in better code (and, like based, allows you to overlay anything with anything)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am
No new posts Update the Sortout file with record c... karthik_sripal SYNCSORT 8 Tue May 17, 2016 8:52 pm
No new posts Declaration of varchar in cobol s.saranya srinivasan COBOL Programming 6 Fri Sep 25, 2015 11:43 am
No new posts COBOL File Declaration for RECFM=VBS ... thinkmsk COBOL Programming 4 Fri Apr 03, 2015 3:31 pm
No new posts How to know in which cics region pro... rikdeb CICS 3 Fri Mar 27, 2015 12:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us