[NEWSboard IBMi Forum]

Hybrid View

  1. #1
    Registriert seit
    Apr 2012
    Beiträge
    360
    Brauche ich eigentlich den CMD dazu?

    ich habe das Programm aufgerufen und bei mir ist immer

    [/CODE]
    APIErrDS.QUSBAVL = 26
    Click image for larger version. 

Name:	2017-06-28 10_36_20-Sitzung C - [24 x 80].png 
Views:	6 
Size:	5,3 KB 
ID:	389
    [/CODE]

    Code:
    
    
    Code:
                                                                                                        
         H DFTACTGRP(*NO) OPTION(*SRCSTMT : *NODEBUGIO)                                                 
                                                                                                        
          //************************************************************                                
          // RTVJOBD - Retrieve Job Description Command Proc Pgm.                                       
          //           This program returns the library list                                            
          //           of the specified Job Description ("jobd").                                       
          //           In addition, the number of library names                                         
          //           in the jobd's library lis is also returned.                                      
          //           See the associated RTVJOBD CMD source for use                                    
          //           in CL.                                                                           
                                                                                                        
          ** D/COPY HJISRC/QCpySrc,GetLibLR                                                             
                                                                                                        
         D GETLIBLR        PR                  ExtPgm('GETLIBLR')                                       
         D  szJobD                       20A   Const                                                    
         D  rtnLIBL                    2750A                                        Options             
         D  rtnLIBLCount                  5I 0                                      (*Nopass : *Omit)   
         D*                                                                                             
         D GetLibLR        PI                                                                           
         D  szJobD                       20A   Const                                                    
         D**rtnLIBL                    2750A   Options(*Nopass : *Omit)                                 
         D  rtnLIBL                    2750A                                                            
         D  rtnLIBLCount                  5I 0                                                          
                                                                                                        
         D/COPY QSYSINC/QRPGLESRC,QWDRJOBD                                                              
         D/COPY QSYSINC/QRPGLESRC,QUSEC                                                                 
                                                                                                        
          // Retrieve Job Description                                                                   
         D RtvJobDAPI      PR                  ExtPgm( 'QWDRJOBD' )                                     
         D  szRtnBuffer               65535A   OPTIONS( *VARSIZE )                                      
         D  nRtnBufLen                   10I 0 Const                                                    
                                                                                                        
          // Specify 'JOBD0100'                                                                         
         D  apiFormat                     8A   Const                                                    
         D  JobD                         20A   Const                                                    
         D  api_error                          LikeDS( QUSEC )                                          
                                                                                                        
         D JobD            DS                  LikeDS( QWDD0100 )                                       
         D                                     Based( pJobD )                                           
                                                                                                        
         D JobDInfo        DS                  LikeDS( QWDD0100 )                                       
                                                                                                        
         D LibList         S             11A   Based( pLIBL ) DIM( 250 )                                
         D LibL            S           2750A   Based( pLIBL )                                           
         D APIErrDS        DS                  LikeDS( QUSEC )                                          
                                                                                                        
          /FREE                                                                                         
           *INLR = *ON;                                                                                 
                                                                                                        
           // Sadly, with this API, we need to call it twice to get the LibL                            
           // First call: Get the length of the data to be returned.                                    
                                                                                                        
           APIErrDS         = *ALLX'00';                                                                
           APIErrDS.QUSBPRV = %size( APIErrDS );                                                        
           JobDInfo         = *ALLX'00';                                                                
           RtvJobDAPI( JobDInfo                                                                         
                     : %size( JobDInfo )                                                                
                     : 'JOBD0100'                                                                       
                     : szJOBD                                                                           
                     : APIErrDS );                                                                      
                                                                                                        
           If APIErrDS.QUSBAVL = 0;                                                                     
                                                                                                        
              pJobD = %Alloc( JobDInfo.QWDBAVL );                                                       
              JOBD = *ALLX'00';                                                                         
                                                                                                        
           // Second call: Get the library list.                                                        
              RtvJobDAPI( JOBD                                                                          
                        : JobDInfo.QWDBAVL                                                              
                        : 'JOBD0100'                                                                    
                        : szJOBD                                                                        
                        : APIErrDS );                                                                   
              If %Parms >= 3;                                                                           
                 rtnLIBLCount = JobD.QWDNLILL;                                                          
              EndIF;                                                                                    
                                                                                                        
              If %Parms >= 2;                                                                           
                 pLibl   = pJobD + JobD.QWDOILL;                                                        
                 rtnLibl = %subst( LIBL : 1 : JobD.QWDNLILL * %size( LibList ) );                       
                                                                                                        
              EndIF;                                                                                    
              DeAlloc pJobD;                                                                            
           EndIF;


  2. #2
    Registriert seit
    Feb 2001
    Beiträge
    20.696
    Mach mal eine DSPMSGD CPF9810, ich meine das heißt "Objekt nicht gefunden".
    Bedenke die Aufrufparameter!
    Die JOBD wird in der Form "JOBDxxxxxxLIBNAMExxx" übergeben.
    Der letzte Parameter muss 2750 Zeichen lang sein!
    Von der Kommandozeile geht das nicht.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  3. #3
    Registriert seit
    Apr 2012
    Beiträge
    360
    Danke, das war es.
    Mit dem Libname habe ich das völlig übersehen

Similar Threads

  1. 3488 Info Window II
    By hdw2 in forum IBM i Hauptforum
    Antworten: 0
    Letzter Beitrag: 18-07-14, 14:27
  2. SPL-Info's in DTAQ's
    By Bodo Roggenkamp in forum IBM i Hauptforum
    Antworten: 4
    Letzter Beitrag: 10-04-08, 12:11
  3. Visual Info (WAF)
    By schramka in forum IBM i Hauptforum
    Antworten: 0
    Letzter Beitrag: 07-06-02, 09:41
  4. Info zu IXA
    By PS in forum IBM i Hauptforum
    Antworten: 0
    Letzter Beitrag: 14-02-02, 08:02
  5. QUERY Info
    By awellen in forum IBM i Hauptforum
    Antworten: 2
    Letzter Beitrag: 14-12-01, 13:02

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • You may not post attachments
  • You may not edit your posts
  •