Rick,

Below is a sample program that reads a data q and processes the spool files
from it.   CPYTOIMPF copies a PF to an import file which can be a comma
delimited file.  It, and its cousin CPYFRMIMPF, make it very easy to
transfer data back and forth between different systems.

Scott Mildenberger


     h dftactgrp(*no)
     h actgrp(*new)
     h bnddir('MRLBIND')
     h option(*srcstmt : *noshowcpy : *nodebugio)

      *
      * Calls QRCVDTAQ for a data queue associated with a spool file.
      * The wait time is negative so it always waits for an entry.
      *
      * Parameters
      *
     d dataq           S             10A   inz('MRLMKTD3')
     d Library         S             10a   inz('*LIBL  ')
     d Length          S              5  0 inz(132)
     d Wait            S              5  0
      *
     d Spool_Num_Dec   S              5  0
      *
      * Outq Information returned to the Dataq
      *
     d Data            DS
     d Function                      10a
     d Type                           2a
     d Job_Name                      10a
     d User_Name                     10a
     d Job_Number                     6a
     d Spool_File                    10a
     d Spool_Num_Bin                  8b 0
     d Outq_Name                     10a
     d Outq_Library                  10a
     d Reserved                      56a

      /copy common/qprotosrc,sys_utils

      * Set Wait time
      *
     c                   eval      wait = -1
      *
     c                   do        *hival
      *
     c                   call      'QRCVDTAQ'
     c                   parm                    dataq
     c                   parm                    Library
     c                   parm                    length
     c                   parm                    data
     c                   parm                    wait
      *
      * Use a control Spool file to terminate the program
      *
     c                   if        Spool_File = 'EXIT'
     c                   leave
     c                   end
      *
     c                   z-add     Spool_Num_Bin Spool_Num_Dec
      *
      * Call send CLP
      *
     c                   call(e)   'MRLMKTD3C'
     c                   parm                    spool_file
     c                   parm                    job_name
     c                   parm                    user_name
     c                   parm                    job_number
     c                   parm                    spool_num_dec
      *
     c                   enddo
      *
     c                   eval      *inlr = *on

> -----Original Message-----
> From: Rick Rayburn [mailto:the400man@hotmail.com]
> Sent: Thursday, August 15, 2002 6:54 AM
> To: midrange-l@midrange.com
> Subject: Re: Sending a user results of a query
>
>
> Attaching DTAQ to OUTQ? That's great! Can you tell me the
> parameters to
> check for off of the RCVDTAQ command for a spool file coming in?
>
> Also, I have never tried the CPYTOIMPF command...can you tell
> me a little
> about it? Is it only for spool files? Does it automatically create CSV
> formatted file? What is it generally used for? Anything you
> can share will
> be of great assistance Vernon.
>
> Thanks for your time as always.
>
> Rick Rayburn
>
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.