ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Issues with ovrprtf and pdf creation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issues with ovrprtf and pdf creation

    Ok this works:
    Code:
                  dcl &username *char 10                            
                  dcl &direntry *char 40                            
                  dcl &pdfname  *char 15  VALUE(outfile.PDF')  
                                                                    
                                                                    
                 RTVJOBA    USER(&USERNAME)                         
                                                                    
    CHGVAR     VAR(&DIRENTRY) VALUE('/usrfls/out/' *CAT &username)  
          MD         DIR(&direntry) DTAAUT(*RWX) +                  
                             OBJAUT(*ALL)                           
                             monmsg cpf0000                                         
    chgvar     var(&direntry) value(&direntry *Tcat '/'  *Tcat +    
                   &pdfname)                                        
      RMVLNK &DIRENTRY                                              
      MONMSG CPF0000                                                
    OVRPRTF    FILE(QPQUPRFIL) DEVTYPE(*AFPDS) +       
                     TOSTMF(&DIRENTRY) WSCST(*PDF)
    and this works:
    Code:
      OVRPRTF    FILE(QPRT80) TOFILE(QPRT80) DEVTYPE(*AFPDS) +  
                   FRONTMGN(.01 .01) BACKMGN(.01 .01) +         
                   DRAWER(3) DUPLEX(*YES) UOM(*INCH) +          
                   FRONTOVL(rqfrnt) BACKOVL(rqback 0 0 +        
                   *CONSTANT) +                                 
                   TOSTMF('/usrfls/out/myuserid/testrq.pdf') + 
                   WSCST(*PDF)
    This does NOT work:
    Code:
        CHGVAR     VAR(&DIRENTRY) VALUE('/usrfls/out/' *CAT &username) 
        MD         DIR(&direntry) DTAAUT(*RWX)   OBJAUT(*ALL)          
                   monmsg cpf0000
          
                  chgvar     var(&direntry) value(&direntry *Tcat '/'  *Tcat + 
                   &pdfname)                                     
                               
        OVRPRTF FILE(QPRT80) TOFILE(QPRT80) + 
                      DEVTYPE(*AFPDS) FRONTMGN(.01 .01) +        
                      BACKMGN(.01 .01) DRAWER(3) DUPLEX(*YES) +  
                      UOM(*INCH) FRONTOVL(RQFRNT) +              
                      BACKOVL(RQBACK 0 0 *CONSTANT) +            
                      TOSTMF(&direntry) +                        
                      WSCST(*PDF)
    PHP Code:
    Message ID . . . . . . :   CPA0702       Severity . . . . . . . :   99        
    Message type 
    . . . . . :   Inquiry                                            
    Date sent  
    . . . . . . :   09/03/15      Time sent  . . . . . . :   08:59:24  
                                                                                  
    Message 
    . . . . :   MCH3601 received by procedure RQ010CLC. (C D I R)         
    Cause . . . . . :   ILE Control language (CLprocedure RQ010CLC in module    
      RQ010CLC in program RQ010CLC in library FARMLIB detected an error at        
      statement number 0000000900.  Message text 
    for MCH3601 isPointer not set  
      
    for location referenced.  Use F10 (if available) or the Display Job Log     
      
    (DSPJOBLOGcommand to see the messages in the job log for a more complete  
      description of what caused the error
    .  If you still are unable to solve the 
      problem
    please contact your technical support person.                      
    Recovery  . . . :   This inquiry message can be avoided by changing the       
      procedure
    Monitor for the error (MONMSG command) and perform error recovery
      within the procedure
    .  To continue, choose a reply value.                   
    Possible choices for replying to message . . . . . . . . . . . . . . . : 
    PHP Code:
     Pointer not set for location referenced.                                
     Function 
    checkMCH3601 unmonitored by RQ010CLC at statement 0000000900,
       
    instruction X'0000'.                                                  
     
    MCH3601 received by procedure RQ010CLC. (C D I R)                       
     
    MCH3601 received by procedure RQ010CLC. (C D I R
    Any input would be appreciated
    Thanks
    GLS

    < e d i t > V6R1 current on ptf's < / e d I t >
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

  • #2
    Re: Issues with ovrprtf and pdf creation

    The pointer not set message is indicating your not passing a parameter to your program.

    Comment


    • #3
      Re: Issues with ovrprtf and pdf creation

      Problem solved.......sort of

      Once upon a time about 20+ years ago we had a 3rd party ocl to cl assistant package called ESX/Prostart.
      That package had a command ..... dsppgmmsg which is similar to sndusrmsg.
      Code:
          SNDUSRMSG  MSG('Print on back of page Y/N') + 
                       MSGTYPE(*INQ) MSGRPY(&TP)    
                 
          DSPPGMMSG  MSG('Print on back of page Y/N') + 
                       MSGTYPE(*INQ) MSGRPY(&TP)  
      
         // * 'Print on back of page Y/N'
         // IF ?2R?/
      All 3 above are roughly the same.

      When I used the dsppgmmsg in this case it spiked the above error on the next statement ...... the ovrprtf command .... even though &tp was visable in debug and not used on the ovrprtf command.
      I've tried to duplicate the issue in other cl programs but could not.

      I changed to sndusrmsg ..... all worked as expected.
      changed back to dsppgmmsg ...... same error.

      I'm posting the detail here in case someone has this issue in the future.

      Thanks DAG for the assist......
      and thanks to all who looked into this
      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment

      Working...
      X