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: 2038
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

Senior Member


Joined: 14 Mar 2007
Posts: 10535
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: 672
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

Senior Member


Joined: 14 Mar 2007
Posts: 10535
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
This topic is locked: you cannot edit posts or make replies. DFSORT output in CSV for data spans i... hiravibk DFSORT/ICETOOL 3 Tue Nov 13, 2018 7:55 pm
No new posts Writing multiple records into a CSV r... hiravibk DFSORT/ICETOOL 2 Wed Nov 07, 2018 2:35 pm
No new posts Calling and updating SAS Macro variab... Yogesh Jaiswal All Other Mainframe Topics 7 Thu Oct 11, 2018 12:37 pm
No new posts Need help on the multiple files refor... wik123 DFSORT/ICETOOL 7 Wed Sep 19, 2018 10:47 am
No new posts Number of Packages required for stati... manojthokala7 DB2 4 Mon Sep 17, 2018 7:14 pm

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