× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: My own spooling program?
  • From: "Stone, Brad V (TC)" <bvstone@xxxxxxxxxxxxxx>
  • Date: Fri, 25 Aug 2000 07:55:56 -0500

I just did an article on this for Midrange Computing.   The article is
"Giving your output Queues a Trigger Finger".  If you don't get the mag, you
can at least get the source for the programs.

The main thing behing this is attaching a data queue to an output queue.
You can do this with CRTOUTQ or CHGOUTQ.  When a spooled file reaches
"ready" status, a record is written to the data queue.  Then, you have a
program that monitors that data queue and does what ever you want after
that.  

Here's the link to the issue:
http://www.midrangecomputing.com/mc/monthdisplay.cfm?md=20005

Brad

> -----Original Message-----
> From: janusz.prusaczyk@big.pl [mailto:janusz.prusaczyk@big.pl]
> Sent: Friday, August 25, 2000 7:30 AM
> To: RPG400-L@midrange.com
> Subject: My own spooling program?
> 
> 
> Would it be difficult to write a program monitoring OUTQ, 
> getting text from
> spool files and changing their status based on spool name and USRDTA.
> 
> To be clear, I would like to write something which would work 
> like this:
> 
> 1. User prints something, as he/she always does
> 2. Spool enters OUTQ
> 3. My program gets notified about new spool
> 4. My program checks spool name and user data
> 5. My program gets text from spool file
> 6. {My program sends this text through network to different 
> Perl program,
> notifying it about spool name and USRDTA} -OR- {writes this 
> to IFS text file
> creating unique filename from spool name and USRDTA, IFS file 
> is monitored
> by my Perl program} -OR- {RPG sends printer control commands 
> to a printer
> through CA printer session [not network printer with own IP address]}
> 7. My Perl program does watever I want with received data, in this
> particular example converts it to RTF and prints.
> 
> I do not know how:
> 
> a. Get notified about new spool in OUTQ
> b. Get spool text (I know there is some API for this, someone 
> told me this
> earlier on MIDRANGE-L) and change spool attributes (RDY -> SAV)
> c. Write to network socket in RPG
> d. Send cotrol commands (eg. PCL) to printer defined in Client Access
> printer session
> 
> My questions are:
> 
>  - Is it rather complicated to accomplish? (in this case I'll 
> give up this
> time)
>  - If you think it can be done by begginer, how can I start, 
> and what should
> I read?
>  - Do not be offended as RPG400-L members, but is there a way 
> to do all this
> through network using some kind of Client Access OLE objects? 
> I understand
> usually you do not use them in Perl, but some VB example 
> would do - I will
> translate...
>  - Do I try to do it wrong way?
> 
> Best regards,
> David
> 
> ***************************
>   Janusz David Prusaczyk
>   janusz.prusaczyk@big.pl
>   tel. +48 (22) 657 57 48
> ***************************
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to 
> RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: 
> david@midrange.com
> +---
> 
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.