Simple printing from CL

pts.
Tags:
AS/400
Is there a simle way to create a 'plain text' spool file in CL, without using DDS? I am trying to create a spool file in a specific OUTQ (configured as a *WSCSTNONE HPT). I do not need the AS400 to create any control characters, s I know the exact sequence of characters I need to print (Zebra ZPL codes). But I need to do this from CL, on demand. Is this possible? If not, how should I proceed to create a spool file with specific data in it?

Answer Wiki

Thanks. We'll let you know when a new response is added.

If you are on V5R4 or higher you can create a simple report from a CL program using <a href=”http://www.powercl.com/”>PowerCL: CL for Files</a> (CLF). There are fee based options of the product to improve productivity but for a simple report the no charge run-time support should suffice. CLF supports both exernal and program described printer output, with examples of both in the documentation.

Bruce Vining (who is part of the company marketing/developing CLF)

==========================================================

IMO yu are on a wrong way : when you will create a spool, it will be in EBCDIC. Are you sure the convertion to ASCII or ANSI will be done correctly by your *WSCST ?

CL is not the good tool. Do the job with RPG. you sample can request less than 10 lines :

FQSYSPRT O F 198 OF PRINTER
C EXCPTITEM
OQSYSPRT E ITEM
O 40 ‘====FIN DE LA LISTE====’

==========================================================

To cause printing in CL, compile as ILE CL and call the printf C library routine. Issue an OVRPRTF FILE(STDOUT) TOFILE(MyPrtF) before calling the printf procedure and delete the override before returning from the CL. Create your MYPRTF however you choose, perhaps simply by CRTDUPOBJ for QSYSPRT.

Tom

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Denisvang
    You can do it in rpg. First set the printer file up as DEVTYPE(*USERASCII) and in the rpg program translate to ascii before printing with the call to QDCXLATE program.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following