HOME

FORUM

UPLOAD SOURCE

RPGLE/RPG

CLLE

SQLRPGLE

DDS

API

OTHER

JAVA

IFS

HTML

JAVA SCRIPT

PHP

MYSQL

XML

OLE DB



    
Enter keyword to search code examples.


Welcome to Code400.com   

Okay...We all like to get free stuff..Right?!? Well thats what we are offering here....Free Stuff
  1. Free storage for your source code.
    Post Your Source

  2. Free access to code samples. (site search)

  3. Free place to ask questions or just say what you want. 
    Share your thoughts

We are interested in what you have to say. If you can’t find what your’e looking for on this site....   Tell us  We will add it.

The small print says: We provide the source code on this site as only a guide. We do not recommend that anyone run any of the code provided on this site without first testing it. If you choose to download source from this site directly onto your production box without testing....Well, YOU are completely to blame and we don’t want to hear about it.

Random Quote

I am a great believer in luck, and I find the harder I work the more I have of it. --Thomas Jefferson (1743 - 1826)





Reroute Spooled files)

Download Programs/Display in text

Reroute Spooled files

These programs will reroute spooled files from one outq to another. If you have a printer problem and need to reroute spooled files to another outqueue this is your tool. It also has example of using dataqueues to communicate between programs. (needs some TLC) Nice tool give it a try. They use the API(s)

  • QUSLSPL
  • QUSCRTUS
  • QUSPTRUS
  • QUSDLTUS


  • Example of listing spooled files for an outqueue
          *=============================================
          * $GetSPLFList - Get Spooled File List
          *=============================================
         c     $GetSPLFList  begsr
          *
          * set this to zero to let OS/400 handle errors
          *
         c                   eval      dsEC.BytesProvided = 0
          *
          * Make space for (approx) 1000 spooled files to be listed
          *
         c                   eval      size = %size(dsLH) + 512 +
         c                                    (%size(dsSF) * 1000)
          *
          * Create a user space
          * List spooled files to the user space
          * Get a pointer to the returned user space
          *
          /free
             // Create a user space
             QUSCRTUS(MYSPACE: 'USRSPC': size: x'00': '*ALL':
              'Temp User Space for QUSLSPL API':  '*YES': dsEC);
    
             // List spooled files to the user space
             QUSLSPL(MYSPACE: 'SPLF0300': '*ALL': OutQName:
                '*ALL': '*ALL': dsEC);
    
             // Get a pointer to the returned user space
             QUSPTRUS(MYSPACE: p_UsrSpc);
          /end-free
          *
          * Loop through list, for each spooled file, display the
          * Status: 1=RDY , 2=OPN, 3=CLO, 4=SAV, 5=WRT, 6=HLD,
          *         7=MSGW, 8=PND, 9=PRT,10=FIN,11=SND,12=DFR
          *
         c                   eval      p_Entry = p_UsrSpc + dsLH.ListOffset
         c                   eval      sf = 1
         c                   dow       sf <= dsLH.NumEntries
          *
          * currently only move status = 1 ready
          *
         c                   if        dsSF.SplfStatus = 1
         c                   exsr      $MoveSplf
         c                   endif
          *
         c                   eval      p_Entry = p_Entry + dsLH.EntrySize
         c                   eval      sf = (sf + 1)
         c                   enddo
          *
          * delete user space
          *
          /free
              QUSDLTUS(MYSPACE: dsEC);
          /end-free
          *
          *
         c                   endsr
    
          *===========================================
    

About Code400.com | resume | Search | Site Map | Suggestions
© Copyright 2003-2008 Code400.com



Monday May 12, 2008 @ 7:59 AM