|
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- [ Picked text/plain from multipart/alternative ] Scott's solutions is very nice, and can be used for other purposes as well... But here is another method that I have used in the past.. STRQMQRY QMQRY(ALLOCATED) OUTPUT(*OUTFILE) + QMFORM(*QMQRY) OUTFILE(QTEMP/ALLOCATE) + ALWQRYDFN(*YES) CPYTOIMPF FROMFILE(QTEMP/ALLOCATE) + TOSTMF('\timtest\allocate.csv') + MBROPT(*REPLACE) RCDDLM(*CRLF) SNDM FROM(THATZENBELER@xxxxx.NET) + FILE(TESTMAIL) SUBJECT('ALLOCATION DATA') + ATTACHMENT('Timtest/ALLOCATE.csv') + REPLYTO(THATZENBELER@xxxxx.NET) + TMPDIR('/Timtest') > -----Original Message----- > From: Rick Rayburn [SMTP:the400man@hotmail.com] > Sent: Thursday, August 15, 2002 8:10 AM > To: midrange-l@midrange.com > Subject: RE: Sending a user results of a query > > this is great Scott! > So, let me see if I have some of this straight: I read in the spool file > attributes from the dataq, call the clp program (e.g.'MRLMKTD3C') to copy > spool file to a, for instance, 132 byte flat PF and then execute a > CPYTOINPF > command to send a CSV-formatted file (is CSV the default on CPYTOINPF) > to...????....mail server?...another 400?...any address on my LAN?... > > Thanks again Scott. This info is very helpful. > > Rick > > > > >From: Scott Mildenberger <Smildenber@Washcorp.com> > >Reply-To: midrange-l@midrange.com > >To: "'midrange-l@midrange.com'" <midrange-l@midrange.com> > >Subject: RE: Sending a user results of a query > >Date: Thu, 15 Aug 2002 07:56:19 -0600 > > > >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 > > > > > > > >_______________________________________________ > >This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing > list > >To post a message email: MIDRANGE-L@midrange.com > >To subscribe, unsubscribe, or change list options, > >visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l > >or email: MIDRANGE-L-request@midrange.com > >Before posting, please take a moment to review the archives > >at http://archive.midrange.com/midrange-l. > > > > > _________________________________________________________________ > Join the world's largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > _______________________________________________ > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing > list > To post a message email: MIDRANGE-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l > or email: MIDRANGE-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review; use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.
As an Amazon Associate we earn from qualifying purchases.
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.