Author Topic: Printing with Common Server  (Read 7022 times)

mikebee49

  • Newbie
  • *
  • Posts: 4
    • View Profile
Printing with Common Server
« on: August 05, 2009, 06:28:13 AM »
Hi,

With Spool File Archive, we used the command FNDKEYRDAR, and in the "OUTPUT" parameter we specified "*PRINT" to print the segment or full report. In Common Server, there is no "OUTPUT" parameter with command FNDKEYOND. The command PRTRPTOND prints the full report, not segment. I don't want to open the OnDemand client every time a user prints a segment/report. Any solutions?

Also, when I print the segment/report from the OnDemand Client, it prints a blank page, even though I have data on my screen.

Thanks!

Mike

Joe Wolken

  • Full Member
  • ***
  • Posts: 113
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
Re: Printing with Common Server
« Reply #1 on: August 05, 2009, 07:08:05 AM »
I would suggest that you try the QSHELL command: ARSDOC PRINT
This command includes:
-f parameter for a folder name
-i parameter for an SQL query string (this should enable you to narrow to a specific segment)
-P parameter for a system printer

Type QSH at the command line to get a QSHELL command line. Then type ARSDOC PRINT and press Enter to get a list all of the parameters.

Good luck,
Joe
#Installation #Upgrade #Migration #Administration #Integration #Customization #Training, and more!

Call: 512-402-1123
email: wolkenj@oascorp.com 
Click: http://www.OASCorp.com

mikebee49

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Printing with Common Server
« Reply #2 on: August 06, 2009, 08:31:17 AM »
Thanks Joe! I've tried it "on the side" and it will work.

I do have another question. With FNDKEYRDAR, it created a spool file of the segment/report. I don't have a spool file with FNDKEYOND. Is it possible to generate one?

Thanks!

Joe Wolken

  • Full Member
  • ***
  • Posts: 113
  • CMOD iSeries Consultant
    • View Profile
    • OAS Corp.
Re: Printing with Common Server
« Reply #3 on: August 06, 2009, 10:07:07 AM »
Appendix A of the OnDemand Common Server v.5.4 Admin Guide says that the FNDKEYOND command is "intended as an API to launch the OnDemand Client from a green screen application".  I do not think that IBM provided the ability to create a spool file of the segment/report using this API.

Good Luck,
Joe Wolken
#Installation #Upgrade #Migration #Administration #Integration #Customization #Training, and more!

Call: 512-402-1123
email: wolkenj@oascorp.com 
Click: http://www.OASCorp.com

soniab

  • Guest
Printing with Common Server
« Reply #4 on: November 12, 2009, 01:51:20 PM »
I have a problem with the api ARSDOC PRINT. 

Example: qsh cmd('arsdoc print -f INVOICES -h ONDTEST -v -i "WHERE F_05 = ''999999' '" -P P810DE02L')

INVOICES is the folder name.
ONDTEST is the instance name.

When I execute the api, a job QP0ZSPWP is submitted in Batch for user ONDTEST. A spool is producted in the output queue P810DE02L for job QP0ZSPWP, user ONDTEST.

But I can have 10 requests in same time. How I can retrieve the spool produced by my original job?

Thank in advance for your assistance.

Sonia  ???
 



mpavel

  • Guest
Re: Printing with Common Server
« Reply #5 on: January 26, 2010, 08:06:08 AM »
Had to fight that battle already.  Since Common Server prints thru QSHELL (as Joe mentioned above), only option is to control the Output Queue it is sent to (on ARSDOC Print command), and monitor that queue (using Data Queues & a program).  When it shows up, you have to decide what to do with it.  We have an application that will Fax/Email documents from Common Server:
--Multiple programs drop records into a file for request to print.
--Program 1 reads a record from that file, and requests the document to print, and waits. 
--QShell does it's thing, the document shows up in the Outq, and an entry is placed in the Data Queue.
--Program 2 reads the Data Queue, and reads the spool file for the key information we use to pull it
   (Invoice #, Customer #), and writes an entry to a second Data Queue (keys, spoolfile ID, Job ID)
--Program 1 reads that Data Queue, checks to see if it is the correct Document type (Invoice), and if
   the keys match (Invoice #, Customer #), continues to process the spoolfile (fax or email, or
   could even print)

SFA was much easier !  But since every print request is submitted, you can't track it directly.

Also, we only do this with documents that came from spool files--scanned documents will not print to an outq, they must go to the IFS, but we haven't gotton that far (but how difficult can that be !).

Hope it helps.