PL/I

PL/I

PL/I

 View Only
  • 1.  %DCL PROCEDURE PREPRO

    Posted Tue January 13, 2015 03:52 AM

    Hi.
    I use PL1 3.9 for zos.
    I have a procedure PREPRO and the call to this procedure into a INCLUDE MEMBER:
     

    %DCL DCL_MTH ENTRY EXTERNAL;                                
    %ACT DCL_MTH;                                               
    DCL_MTH(GS1185,3,'METHODE 1',1,MID1,PAGE1,                  
                     'METHODE 2',2,MID1,PAGE1,                  
                     'METHODE 3',1,MID1,PAGE1);                 
    %DCL_MTH:PROC($TP,$NB,$MT001,$SC001,$MID001,$PAGE001,       
                          $MT002,$SC002,$MID002,$PAGE002,       
                          $MT003,$SC003,$MID003,$PAGE003,      
                          $MT004,$SC004,$MID004,$PAGE004);      
    ...
    %END DCL_MTH;

     
    I try to move this procedure into a other INCLUDE member for isolate the statement call and the code of this procedure PREPRO.
    But when i try this operation, i have many error of compil.

    Can you help me ?
    U8JK_Robert_Ohlen


  • 2.  Re: %DCL PROCEDURE PREPRO

    Posted Tue January 13, 2015 08:49 AM
    hi,
    I'm afraid i don't understand your problem completely. 
    Maybe posting a sample - broken down to the minimum - might help. Plus (an excerpt of) the "many errors".
    The following should work anyway:

    Have an "include1" with the preproc-func
    %dcl foo entry;
    %act foo;
    %foo: proc(x);
      ans(x!!'01);
    %end foo;

    Have an "include2" using this
    %include include1;
    foo('abc');

    And finally use this in a source file:
    %include include2;

    br woecki

    woecki


  • 3.  Re: %DCL PROCEDURE PREPRO

    Posted Tue January 13, 2015 09:43 AM
    your example helped me solve my problem.
    In fact, I tried to declare PREPRO procedure in a include and %ACT to another INCLUDE.
    But making as you have said, it works very well.
    thank you
    U8JK_Robert_Ohlen


  • 4.  Re: %DCL PROCEDURE PREPRO

    Posted Wed January 14, 2015 02:10 AM

    glad to be able to help.

    maybe you want to mark this question as "answered" (don't know if i get positive karma points for that :-) but looks like that's the intended usage).

    br woecki

    woecki