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
 

 

dynamic call in PLI using fetch cause error

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

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Wed May 12, 2010 4:55 pm    Post subject: dynamic call in PLI using fetch cause error
Reply with quote

I am testing the dynamic call in PLI using FETCH:
the main program:
Code:
MAINPGM:PROC OPTIONS(MAIN);
  DCL SUBPGM EXTERNAL;     
  FETCH SUBPGM;           
  CALL SUBPGM;             
  RELEASE SUBPGM;         
END MAINPGM; 

the routine:
Code:
SUBPGM: PROC;                     
  PUT SKIP LIST('THE SUBPROGRAM');
END SUBPGM;   


and when compile and link-edit routine,I followed the programming guide to add the link parameter DYNAM=DLL,but no for main program.

And in the programming guide,it indicates that :
[i][i]1. OPTIONS(FETCHABLE) should be specified on the PROCEDURE statement for the entry point of any PL/I routine to be FETCHed.
2. Unless the NORENT option has been specified, the ENTRY declaration in the routine that FETCHes must not specify OPTIONS(COBOL) or
OPTIONS(ASM)—these should be specified only for COBOL or ASM routines not linked as DLLs.
3. OPTIONS(FETCHABLE) must be specified on the PROCEDURE statement for the entry point of the FETCHABLE routine or the procedure must be compiled with the DLLINIT option.
4. Unless the NORENT option has been specified, a PROCEDURE specifiying
OPTIONS(FETCHABLE) must be linked as a DLL.
[/i][/i]

but I don't where to place OPTIONS(FETCHABLE),so I run the main progam and get the error like:
ABENDED S000 U4038
CEE3362S No main or fetchable procedure or function was present within the load module.


Could someone give me help to make the test successfully?
Back to top
View user's profile Send private message

donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Wed May 12, 2010 5:44 pm    Post subject:
Reply with quote

I guess here :

SUBPGM: PROC OPTIONS(FETCHABLE);
PUT SKIP LIST('THE SUBPROGRAM');
END SUBPGM;
Back to top
View user's profile Send private message
satish.ms10

Active User


Joined: 10 Aug 2009
Posts: 158
Location: India

PostPosted: Wed May 12, 2010 8:36 pm    Post subject:
Reply with quote

Subprogram should be define like below.

Code:
SUBPGM: PROC OPTIONS(FETCHABLE);
PUT SKIP LIST('THE SUBPROGRAM');
END SUBPGM;


This code I have tested and it worked.

I am not sure why this need to be declared like this.

I am getting this question because there are so many subprograms FETCHed and CALLed without specifying FETCHABLE option in their definition in my shop.

Can anyone provide more information on this, please.

Thanks!
Back to top
View user's profile Send private message
henry888

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Wed May 12, 2010 9:31 pm    Post subject:
Reply with quote

satish.ms10 wrote:
Subprogram should be define like below.

Code:
SUBPGM: PROC OPTIONS(FETCHABLE);
PUT SKIP LIST('THE SUBPROGRAM');
END SUBPGM;


This code I have tested and it worked.

I am not sure why this need to be declared like this.

I am getting this question because there are so many subprograms FETCHed and CALLed without specifying FETCHABLE option in their definition in my shop.

Can anyone provide more information on this, please.

Thanks!


hi satish,

Could you provide that any special PARMs you used when you compile and link-edit the two programs?

Or when compile and link-edit the two programs any special thing we should take care of?

Many thanks
Back to top
View user's profile Send private message
henry888

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Thu May 13, 2010 8:18 am    Post subject:
Reply with quote

and when I compile and link-edit the SUBPGM,
Code:
SUBPGM: PROC OPTIONS(FETCHABLE);
PUT SKIP LIST('THE SUBPROGRAM');
END SUBPGM;

error generated like:
SEVERE AND ERROR DIAGNOSTIC MESSAGES

IEL0335I S 1 INVALID ITEM IN 'OPTIONS' LIST. 'FETCHABLE' IGNORED.


I don't know why...
Back to top
View user's profile Send private message
henry888

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Thu May 13, 2010 1:17 pm    Post subject:
Reply with quote

the issue is worked out,just replace the compiler with the new version
Back to top
View user's profile Send private message
donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Thu May 13, 2010 3:27 pm    Post subject:
Reply with quote

Great but, did you had that FETCHABLE mentioned in the OPTIONs?
Back to top
View user's profile Send private message
henry888

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Thu May 13, 2010 3:37 pm    Post subject:
Reply with quote

yes...of course
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 14, 2010 4:47 am    Post subject:
Reply with quote

Hello,

Quote:
the issue is worked out,just replace the compiler with the new version
Is there some reason you did not use the standard compile jcl that points to the correct compiler? Programmers should not pick&choose which compiler they will use.

In well-managed organizations, this behavior is not tolerated and has even caused people to be terminated. . . The risk is simply too great.

Not a threat - just a caution. . .
Back to top
View user's profile Send private message
henry888

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Fri May 14, 2010 7:17 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Quote:
the issue is worked out,just replace the compiler with the new version
Is there some reason you did not use the standard compile jcl that points to the correct compiler? Programmers should not pick&choose which compiler they will use.

In well-managed organizations, this behavior is not tolerated and has even caused people to be terminated. . . The risk is simply too great.

Not a threat - just a caution. . .


Hi Dick,

Thanks for your really kind reminder...

The codes just run in the development environment and just for learning,will not be used in production...
What I want to say is that when using the Dynamic Call(FETCH) maybe the high lelvel version of compiler should be used because in some low versions this feature is not supported...
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 14, 2010 8:37 am    Post subject: Reply to: dynamic call in PLI using fetch cause error
Reply with quote

You're welcome - thanks for the clarification icon_smile.gif

Possibly the different versions of the compiler have been set up with different defaults? I don't "do" pl/i, so that is just a guess. . .

d
Back to top
View user's profile Send private message
henry888

New User


Joined: 21 Sep 2009
Posts: 51
Location: china

PostPosted: Fri May 14, 2010 8:44 am    Post subject:
Reply with quote

it can be said different versions of compiler have different compiler options,and the dynamic call option is not implemented in the old version... icon_rolleyes.gif
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri May 14, 2010 12:54 pm    Post subject:
Reply with quote

henry888 wrote:
it can be said different versions of compiler have different compiler options,and the dynamic call option is not implemented in the old version... icon_rolleyes.gif


Bull excrement!

PL/I has supported FETCH since at least the old V1.5 OS compiler in the mid 1980'ies. At the time fetched modules had a few restrictions, but it was there, so don't make statements that have no basis in fact!
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri May 14, 2010 12:58 pm    Post subject: Reply to: dynamic call in PLI using fetch cause error
Reply with quote

PL1 was a great language until polluted with windoze and Cish terms like DLL and similar icon_biggrin.gif
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri May 14, 2010 1:43 pm    Post subject: Re: Reply to: dynamic call in PLI using fetch cause error
Reply with quote

enrico-sorichetti wrote:
PL1 was a great language until polluted with windoze and Cish terms like DLL and similar icon_biggrin.gif


The thing is, you can still use PL/I like it was used when designed in the early 1960's, nobody forces you to use any of the newer stuff, but in some cases it is pretty useful!

Anyway, name some of the C- and Windoze-isms that, according to you, should not be in PL/I, and maybe some things that aren't in the language, but should be!

And let's not start a language war, I'm also a full blooded PL/I (and REXX) guy - no C for me!
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm


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