IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need explanation ENTRY declaration


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Candy

New User


Joined: 09 Dec 2005
Posts: 16

PostPosted: Wed Jan 04, 2006 11:49 am
Reply with quote

Hi Guys,

Can anyone explaing me in detail about the usage of ENTRY declaration in PL/1.

Rgds,
Candy
Back to top
View user's profile Send private message
sairam

New User


Joined: 30 Aug 2005
Posts: 58
Location: Kolkata

PostPosted: Thu Jan 05, 2006 3:54 pm
Reply with quote

Whenever you are using an external procedure in your program you have to declare the external procedure as entry.For example i am using the procedure XCLB008 in my main procedure and i first declare it like below

DCL XCLB008 ENTRY(CHAR(1),CHAR(*)) RETURNS(CHAR(32767) VAR);
dcl var1,var2 char(10)

then in the main procedure i am calling this as follows[/size]
var1='10-10-2005';
var2=XCLB008('7',var1);
and the external procedure should be compiled first and then the main procedure.
Back to top
View user's profile Send private message
shinjini_t

New User


Joined: 11 May 2005
Posts: 14
Location: Bangalore, India

PostPosted: Sat Feb 04, 2006 1:02 pm
Reply with quote

ENTRY basically asks the compiler to generate code to convert the ARGUMENTS to make them compatible with the PARAMETERS in the called program.
Example, this is a code snippet from my main program:

DCL CALL_PGM ENTRY (FIXED DEC(5,2),FIXED DEC(5,2)) RETURNS (FIXED DEC(7,2))

This means that the main pgm calls the CALL_PGM and passes 2 FIXED DEC(5,2) to it and gets a FIXED DEC(7,2) in return from it.

All for the compatibility of the ARGUMENTS which the main pgm passes and the PARAMETERS which the called program recieves in.

Shinjini
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Multiple Entry PL/I & Assembler 5
No new posts COBOL file declaration COBOL Programming 2
No new posts COBOL declaration for table DB2 3
No new posts interesting explanation of DB concurr... General Talk & Fun Stuff 0
No new posts Is the explanation correct? XRST,CHKP IMS DB/DC 1
Search our Forums:

Back to Top