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
 

 

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: 1679
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: 10244
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: 508
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: 10244
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. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm


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