ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Printing Device Descriptions???

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

  • Printing Device Descriptions???

    Hi. I'm throwing myself at the mercy of the forum, as I only gave a cursory look for this.

    I'm running on V6R1M0. We've got a boatload of the QPADEVxxxx created because Client Access wasn't set up with unique workstation profiles for each user. I'm the lucky guy who gets to try to clean all this up.

    Is there a way to print all the DEVD that are on a system? That way I can work from the report.

    Thanks in advance for your help.
    "It's what you learn after you know it all that counts." - John Wooden

  • #2
    Re: Printing Device Descriptions???

    Hi Larry:

    Give one of these a try:
    Code:
    DSPOBJD OBJ(QPADEV*)  OBJTYPE(*DEVD) OUTPUT(*PRINT)
    or
    DSPOBJD OBJ(QPADEV*) OBJTYPE(*DEVD) OUTPUT(*OUTFILE) OUTFILE(QTEMP/JUNKO)<----- creates file junko in qtemp
    Best of luck
    GLS

    < E d i t > if you want all devices change this OBJ(QPADEV*) to this OBJ(*ALL) < / E d i t >
    Last edited by GLS400; July 18, 2012, 10:40 AM.
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment


    • #3
      Re: Printing Device Descriptions???

      easiest way (if this is a one time deal)
      WRKOBJPDM LIB(QUSRSYS) OBJ(QPADEV*) then on the first one type 4 then F13 and hit Enter.

      then
      WRKOBJPDM LIB(QSYS) OBJ(QPADEV*) and repeat the previous steps.

      done in seconds/minutes vs manually one by one for days...
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment


      • #4
        Re: Printing Device Descriptions???

        There is no harm in just killing the devices. New ones get created the next day. I suggest you do what Tom said and just nuke the buggers in PDM.
        Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

        Comment


        • #5
          Re: Printing Device Descriptions???

          Killing Mosquitoes with a cannons!

          PHP Code:
               H OPTION(*NODEBUGIOACTGRP(*NEW)                                                              
          &
          #8218;     *************************************************************************                    €
          &#8218;     *                                                                                            €
          &#8218;     *  Stand Alone variables                                                                     €
          &#8218;     *                                                                                            €
               
          d AllText         s             10    Inz('*ALL')                                              
               
          d Chr8            s              8                                                             
               d Count           s              4  0                                                          
               d Count2          s              4  0                                                          
               d cymd            s              7  0                                                          
               d CreateDateISO   s               D                                                            
               d EntryFmt        s             10    inz
          ('*FIRST')                                            
               
          d Fds#            s             10i 0                                                          
               
          d FFds#           s             10i 0                                                          
               
          d FileLib         s             20                                                             
               d GenLen          s              8                                                             
               d Header          s           2000                                                             
               d I               s             15  0                                                          
               d Infile          s             10                                                             
               d InLibrary       s             10                                                             
               d InType          s             10                                                             
               d MyFiles         s             10    dim
          (1000)                                                
               
          d MyFilesFound    s             10    dim(1000)                                                
               
          d ObjectLib       s             20                                                             
               d ReceiveVr2      s            100                                                             
               d RelRecNbr       s              4  0                                                          
               d RelRecHi
          #       s              4  0                                                          
               
          d SpaceVal        s              1    inz(*BLANKS)                                             
               
          d SpaceAuth       s             10    inz('*CHANGE')                                           
               
          d SpaceText       s             50    inz(*BLANKS)                                             
               
          d SpaceRepl       s             10    inz('*YES')                                              
               
          d SpaceAttr       s             10    inz(*BLANKS)                                             
               
          d TodayISO        s               d                                                            
               d UserSpaceOut    s             20                                                             
               d Worktype        s             10    inz
          ('*DEVD')                                             
          &
          #8218;     *                                                                                            €
          &#8218;     *  Data structures                                                                           €
               
          d GENDS2          ds                  qualified                                                
               d  Filler1                     116                                                             
               d  OffsetHdr                    10i 0                                                          
               d  SizeHeader                   10i 0                                                          
               d  OffsetList                   10i 0                                                          
               d  Filler2                       4                                                             
               d  NbrInList                    10i 0                                                          
               d  SizeEntry                    10i 0                                                          
                                                                                                              
               d HeaderDs        ds                                                                           
               d  OutFileNam                   10    overlay
          (HeaderDS:1)                                      
               
          d  OutLibName                   10    overlay(HeaderDS:11)                                     
               
          d  OutType                       5    overlay(HeaderDS:21)                                     
               
          d  OutFormat                    10    overlay(HeaderDS:31)                                     
               
          d  RecordLen                    10i 0 overlay(HeaderDS:41)                                     
                                                                                                              
               
          d ListDs          ds                  Qualified                                                
               d  FieldName                    10    overlay
          (ListDS:1)                                        
               
          d  FieldType                     1    overlay(ListDS:11)                                       
               
          d  BufferOut                    10i 0 overlay(ListDS:13)                                       
               
          d  FieldLen                     10i 0 overlay(ListDS:21)                                       
               
          d  Digits                       10i 0 overlay(ListDS:25)                                       
               
          d  Decimals                     10i 0 overlay(ListDS:29)                                       
               
          d  FieldDesc                    50    overlay(ListDS:33)                                       
                                                                                                              
               
          d APIErrorDS      ds                  Qualified                                                
               d  BytesP                       10I 0 inz
          (%size(apiErrorDS))                                   
               
          d  BytesA                       10I 0 inz(0)                                                   
               
          d  Messageid                     7                                                             
               d  Reserved                      1                                                             
               d  messagedta                  128                                                             
                                                                                                              
               d                 ds                                                                           
               d  StartPosit                   10i 0                                                          
               d  StartLen                     10i 0                                                          
               d  SpaceLen                     10i 0                                                          
               d  ReceiveLen                   10i 0                                                          
               d  MessageKey                   10i 0                                                          
               d  MsgDtaLen                    10i 0                                                          
               d  MsgQueNbr                    10i 0                                                          
                
          *                                                                                             
               
          dGenSpcPtr                        *                                                            
               
          dLstSpcPtr                        *                                                            
               
          dHdrPtr                           *                                                            
                                                                                                              
                *                                                                                             
               
          d GENDS           ds                                                                           
               d  OffsetHdr                    10i 0  overlay
          (GENDS:1)                                        
               
          d  NbrInList                    10i 0  overlay(GENDS:9)                                        
               
          d  SizeEntry                    10i 0  overlay(GENDS:13)                                       
                *                                                                                             
                * 
          Date structure for retriving userspace info                                                 
                
          *                                                                                             
               
          d InputDs         DS                                                                           
               d  UserSpace              1     20                                                             
               d  SpaceName              1     10                                                             
               d  SpaceLib              11     20                                                             
               d  InpFileLib            29     48                                                             
               d  InpFFilNam            29     38                                                             
               d  InpFFilLib            39     48                                                             
               d  InpRcdFmt             49     58                                                             
                
          *                                                                                             
               
          d ListQPAD        ds                  qualified                                                
               d  Object                       10                                                             
               d  Library                      10                                                             
               d  ObjectType                   10                                                             
               d  InfoStatus                    1                                                             
               d  ExtObjAttrib                 10                                                             
               d  Description                  50                                                             
               
          **-- Object description structure OBJD0400:  ----------------------------**                    
               
          d ObjectDs        ds                  qualified  inz                                           
               d  ObjDscLen                    10i 0                                                          
               d  ObjDscSiz                    10i 0                                                          
               d  ObjNam                       10                                                             
               d  ObjLib                       10                                                             
               d  ObjTyp                       10                                                             
               d  ObjRtnLib                    10                                                             
               d  ObjAsp                       10i 0                                                          
               d  ObjOwnr                      10                                                             
               d  ObjDmn                        2                                                             
               d  ObjCrtDat                    13                                                             
               d  ObjChgDat                    13                                                             
                
          *                                                                                             
               
          d  ObjAtr                       10                                                             
               d  ObjTxt                       50                                                             
               d  ObjSrcFil                    10                                                             
               d  ObjSrcLib                    10                                                             
               d  ObjSrcMbr                    10                                                             
                
          *                                                                                             
               
          d  ObjSrcChgDat                 13                                                             
               d  ObjSrcSavDat                 13                                                             
               d  ObjSrcRstDat                 13                                                             
               d  ObjCrtUsr                    10                                                             
               d  ObjCrtSys                     8                                                             
               d  ObjResDat                     7                                                             
               d  ObjSavSiz                    10i 0                                                          
               d  ObjSavSeq                    10i 0                                                          
               d  ObjStg                       10                                                             
               d  ObjSavCmd                    10                                                             
               d  ObjSavVolId                  71                                                             
               d  ObjSavDvc                    10                                                             
               d  ObjSavFil                    10                                                             
               d  ObjSavLib                    10                                                             
               d  ObjSavLvl                     9                                                             
               d  ObjCompiler                  16                                                             
               d  ObjLvl                        8                                                             
               d  ObjUsrChg                     1                                                             
               d  ObjLicPgm                    16                                                             
               d  ObjPtf                       10                                                             
               d  ObjApar                      10                                                             
                
          *  start of four                                                                              
               d  ObjUseDat                     7                                                             
               d  ObjUsgInf                     1                                                             
               d  ObjUseDay                    10i 0                                                          
               d  ObjSiz                       10i 0                                                          
               d  ObjSizMlt                    10i 0                                                          
               d  ObjCprSts                     1                                                             
               d  ObjAlwChg                     1                                                             
               d  ObjChgByPgm                   1                                                             
               d  ObjUsrAtr                    10                                                             
               d  ObjOvrflwAsp                  1                                                             
               d  ObjSavActDat                  7                                                             
               d  ObjSavActTim                  6                                                             
               d  ObjAudVal                    10                                                             
               d  ObjPrmGrp                    10                                                             
                                                                                                              
               
          **-- Retrieve object description:  -------------------------------                             
               
          d $RtvObjD        Pr                  ExtPgm'QUSROBJD' )                                     
               
          d  RoRcvVar                  32767a         Options( *VarSize )                                
               
          d  RoRcvVarLen                  10i 0 Const                                                    
               
          d  RoFmtNam                      8a   Const                                                    
               
          d  RoObjNamQ                    20a   Const                                                    
               
          d  RoObjTyp                     10a   Const                                                    
               
          d  RoError                   32767a         Options( *VarSize )                                
               **-- List 
          objects:   ---------------------------------------------                             
               
          d $ListObjects    Pr                  ExtPgm'QUSLOBJ' )                                      
               
          d  userspace                    20a   Const                                                    
               
          d  format                        8a   Const                                                    
               
          d  objectlib                    20a   Const                                                    
               
          d  type                         10a   Const                                                    
               **-- 
          Userspace pointer: ------------------------------------------                             
               
          d $Userspace      Pr                  ExtPgm'QUSRTVUS' )                                     
               
          d  userspace                    20a   Const                                                    
               
          d  start                        10i 0 Const                                                    
               
          d  Length                       10i 0 Const                                                    
               
          d  Returned                  32767a         Options( *VarSize )                                
               **-- 
          Create Space:   ---------------------------------------------                             
               
          d $CreateSpace    Pr                  ExtPgm'QUSCRTUS' )                                     
               
          d  UserSpaceOut                 20a   Const                                                    
               
          d  SpaceAttr                    10    Const                                                    
               
          d  SpaceLen                     10i 0 Const                                                    
               
          d  SpaceVal                      1a   Const                                                    
               
          d  SpaceAuth                    10a   Const                                                    
               
          d  SpaceText                    50a   Const                                                    
               
          d  SpaceRepl                    10a   Const                                                    
               
          d  APIErrorDs                32767a         Options( *VarSize )                                
                                                                                                              
          &
          #8218;     *---------------------------------------------------------------                             €
          &#8218;     *  M A I N   L I N E                                                                         €
          &#8218;     *---------------------------------------------------------------                             €
          &#8218;     *                                                                                            €
                
          /free                                                                                         
                    
          // find all files in the passed in Library                                                
                           
          Spacename 'MYPADS';                                                              
                           
          exsr $QUSCRTUS;                                                                    
                                                                                                              
                           
          ObjectLib =  '*ALL      ' 'QSYS';                                                
                   
          //                                                                                         
                   // List all the outqueues to the user space                                                
                   //                                                                                         
                           
          $ListObjectsUserspace 'OBJL0200' ObjectLib WorkType);                      
                   
          //                                                                                         
                   // Retrive header entry and process the user space                                         
                   //                                                                                         
                           
          StartPosit 125;                                                                  
                           
          StartLen   16;                                                                   
                           
          $UserSpaceUserspace StartPosit StartLen GENDS);                            
                                                                                                              
                           
          StartPosit OffsetHdr 1;                                                        
                           
          StartLen = %size(ListQPAD);                                                        
                   
          //                                                                                         
          &#8218;        // Do for number of outqueues in the userspace                            €                
                   //                                                                                         
                                                                                                              
          B1               for count 1 to  NbrInList;                                                       
                            
          $UserSpaceUserspace StartPosit StartLen ListQPAD);                        
                            
          StartPosit += SizeEntry;                                                          
                            if %
          scan('QPAD'ListQPAD.Object) > *zeros;                                       
                             
          // retrieve the device description                                               
                             
          $RtvObjDObjectDS                                                               
                                       
          : %SizeObjectDS )                                                    
                                       : 
          'OBJD0400'                                                           
                                       
          ListQPAD.Object ListQPAD.library                                   
                                       
          ListQPAD.ObjectType                                                  
                                       
          ApiErrorDS                                                           
                                                        
          );                                                    
                                                                                                              
                            
          // see if created today  & if so delete it                                        
                             
          cymd = %dec(%subst(OBJECTDS.OBJCRTDAT:1:7):7:0);                                 
                             
          test(de) *cymd  cymd;                                                            
                             if 
          not%error;                                                                    
                              
          createdateIso = %date(cymd:*cymd);                                              
                              if 
          CreateDateIso TodayISO;                                                    
                              endif;                                                                          
                             endif;                                                                           
                                                                                                              
                            endif;                                                                            
                           endfor;                                                                            
                                                                                                              
                           
          clear Myfiles;                                                                     
                           
          reset Fds#;                                                                        
                           
          clear MyFiles;                                                                     
                           
          reset fds#;                                                                        
                                                                                                              
                           
          for count 1 to FFds#;                                                            
                           
          endfor;                                                                            
                                                                                                              
                           *
          inlr = *on;                                                                       
                                                                                                              
                  
          //--------------------------------------------------------                                  
                  // $QUSCRTUS - create userspace                                                             
                  //--------------------------------------------------------                                  
                           
          begsr $QUSCRTUS;                                                                   
                                                                                                              
                            
          APIErrorDS.BytesP 116;                                                          
                            
          SpaceLib 'QTEMP';                                                               
                                                                                                              
                         
          //                                                                                   
                         // Create the user space                                                             
                         //                                                                                   
                            
          $CreateSpaceUserspace SpaceAttr 4096 :                                      
                                          
          SpaceVal SpaceAuth SpaceText SpaceRepl:                       
                                          
          APIErrorDs);                                                        
                           
          endsr
          Attached Files
          I'm here to chew bubble gum and kick @#%@#%@#%.....and I'm all outta bubble gum !
          Yes I'm talking to you squirrel nuts.

          Comment

          Working...
          X