Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Calling procedure with multiple entries contained in fetchab

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

New User


Joined: 27 Jan 2017
Posts: 2
Location: Austria

PostPosted: Fri Jan 27, 2017 3:33 pm    Post subject: Calling procedure with multiple entries contained in fetchab
Reply with quote

Hi,

let's suppose I have this fetchable:

Code:

MYFETCH: PROC(PAR1, PAR2, PAR3)
    OPTIONS(FETCHABLE);

    DCL (PAR1, PAR2) BIN FIXED(31) PARM;
    DCL (PAR3) PTR PARM;

   RETURN;
   
    ENTRY1: ENTRY(PAR1, PAR2) RETURNS(BIN FIXED);
       RETURN(0);

    ENTRY2: ENTRY(PAR3) RETURNS(BIT(1));
       RETURN('1'B);

    ENTRY3: ENTRY();
       RETURN;
 END MYFETCH;


and I want to call that fetchable from my main-program like that:


Code:

 TEST: PROC OPTIONS(MAIN);
   IF '0'B THEN FETCH MYFETCH;
   
   DCL ENTRY1 EXT ENTRY(BIN FIXED(31), BIN FIXED(31)) RETURNS(BIN FIXED);
   DCL ENTRY2 EXT ENTRY(PTR) RETURNS(BIT(1));
   DCL ENTRY3 EXT ENTRY();
   
   DCL BF BIN FIXED(31);
   DCL BV BIT(1);
   
   BF = ENTRY1(0,0);
   BV = ENTRY2(NULL());
 END TEST;


Compile is ok, but linking fails. How can I solve the problem? Is something wrong with the declares of the ext entries? Is it possible at all?

Regards,
Reinhard
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1805
Location: NY,USA

PostPosted: Sat Jan 28, 2017 1:29 am    Post subject:
Reply with quote

Welcome!
Whatever it is, I guess it is essential to post the failed messages, so as to get specific answers.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Sat Jan 28, 2017 2:48 am    Post subject: Reply to: Calling procedure with multiple entries contained in fetchab
Reply with quote

Quote:
I guess it is essential to post the failed messages, so as to get specific answers.


the linkage fails because of the unresolved external references
to entry1,entry2,entry3

nobody told the compiler that entry1,entry2,entry3 are / belong to a fetchable module
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 574
Location: The Universe

PostPosted: Sat Jan 28, 2017 5:52 am    Post subject:
Reply with quote

Now i am no PL/I expert, and the true PL/I experts should correct this if it is wrong, but ...
  • When the MYFETCH module is linked, ENTRY1, ENTRY2 and ENTRY3 should be designated as an ALIAS of MYFETCH, AND
  • In the TEST procedure, ENTRY1, ENTRY2 and ENTRY3 should be declared as fetchable and should be fetched.
You got the unresolved reference for ENTRY1, ENTRY2, and ENTRY3 because they were not defined as fetchable, so they were left to be static linked in the TEST procedure.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Sat Jan 28, 2017 6:55 am    Post subject: Reply to: Calling procedure with multiple entries contained in fetchab
Reply with quote

I wanted to suggest the same,
but I refrained since I was not able to test
system down for planned maintenance icon_cool.gif
Back to top
View user's profile Send private message
R.Kaeferboeck

New User


Joined: 27 Jan 2017
Posts: 2
Location: Austria

PostPosted: Sat Jan 28, 2017 2:49 pm    Post subject: Reply to: Calling procedure with multiple entries contained in fetchab
Reply with quote

Thanks for your suggestions, will try it out on Monday and tell you the result.
regards,
Reinhard
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us