PL/I

PL/I

PL/I

 View Only
  • 1.  __get_cpuid

    Posted Thu May 17, 2018 11:10 AM

    based on a 2012 post by IBM member cww, i'm trying to use the topic function in a pl/1 program (on V4.R5.M0 sadly), but the link fails - no doubt a library is missing from the JCL. However This appears to be a C/C++ runtime library!!! 

    the pl/1 dcl of the function is this: 

     dcl getcpuid ext('__get_cpuid') entry(char(11) byaddr)

         returns(optional fixed bin(31))
     options( linkage(optlink) nodescriptor );

     

    the link error is 

    IEW2456E 9207 SYMBOL __get_cp UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.

     

    Anyone have any suggestions? E.G. go ask a C/C++ developer where it might be - i don't go there myself.

     

    thanks in advance,

     

    Mike

    MikeUK


  • 2.  Re: __get_cpuid

    Posted Sun May 20, 2018 12:20 PM

    I notice in the linker message the name was truncated to 8 characters.

     

    Could it be that your LIMITS(EXTNAME(...)) option is defaulting to 8 characters, and the PL/I compiler is quietly truncating the name of your external reference?

     

    Just something to check...

     

      - Dave Rivers -

     

    tdr


  • 3.  Re: __get_cpuid

    Posted Mon May 21, 2018 06:10 AM

    Thank you for the feedback Dave! It appears to have advanced the issue (if only to the next hurdle). Now  i have to address 'side deck' issues - affecting both the compile (SEVERE ERROR EDC4000: Unable to open DD:SYSDEFSD.)  and the link (original message cited above). 

     

    Mike ODonnell

    MikeUK


  • 4.  Re: __get_cpuid

    Posted Fri May 25, 2018 05:21 PM

    I would change the declare to

     

       dcl __get_cpuid ext('__get_cpuid')

                      entry( char(11) byaddr outonly )
                      returns( optional fixed bin(31) byvalue )
                      options( linkage(optlink) nodescriptor ); 

     

    this works for me (without any use of sidedecks)

    pelderon


  • 5.  Re: __get_cpuid

    Posted Mon May 28, 2018 08:05 AM

    Hi Mike,

    The EDC4000 message suggests that you're running with the prelinker. Any reason you're still using it?

    Anyway, *.SCEELKEX in the binder SYSLIB will resolve __get_cpuid (via the @@DC370$ member). It must be ahead of *.SCEELKED in the SYSLIB concatenation.

    Bernie

     

    brataj


  • 6.  Re: __get_cpuid

    Posted Tue May 29, 2018 11:39 AM

    Thank you Bernie 

     

    as for the prelinker, i'm using it because that's what i was handed - so out it goes. 

    I will post results. The link is now CC=0 but the listing did not even include the text '__get_cpuid'. Will unit test.

     

    Mike

     

     

     

    MikeUK


  • 7.  Re: __get_cpuid

    Posted Wed June 20, 2018 06:36 AM

    Hello,

    just to update i'm back to using the PL/I UUID function as i've had V5.1 installed. I do appreciate the feedback greatly. I really had no business trying to make that GUID code work, as i'm coming back to PL/I after  >20 years in assembler. Step at a time. Thanks to all again!

     

    Mike

    MikeUK