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
 

 

Need explanation ENTRY declaration

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Need explanation ENTRY declaration
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    Post subject:
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    Post subject: Re: Need explanation ENTRY declaration
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    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 Is the explanation correct? XRST,CHKP Martylin IMS DB/DC 1 Wed Mar 15, 2017 9:26 am
No new posts Automation of data entry using Rexx i... zingy.rajeev CLIST & REXX 4 Mon Aug 22, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Automation of data entry using Rexx i... zingy.rajeev CICS 0 Mon Aug 22, 2016 4:11 pm
This topic is locked: you cannot edit posts or make replies. ISPF skeleton explanation Akshay Yadav TSO/ISPF 2 Tue Feb 16, 2016 12:47 pm
No new posts Declaration of varchar in cobol s.saranya srinivasan COBOL Programming 6 Fri Sep 25, 2015 11:43 am


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