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

Calling procedure with multiple entries contained in fetchab


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

New User


Joined: 27 Jan 2017
Posts: 5
Location: Austria

PostPosted: Fri Jan 27, 2017 3:33 pm
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Sat Jan 28, 2017 1:29 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Jan 28, 2017 2:48 am
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: 917
Location: The Universe

PostPosted: Sat Jan 28, 2017 5:52 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Jan 28, 2017 6:55 am
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: 5
Location: Austria

PostPosted: Sat Jan 28, 2017 2:49 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top