spoolfileread

350 pts.
Tags:
AS/400
AS/400 Spool Files
RPG Program
Spool files
how to read spool files in rpg program,i want to read spool file in rpg program

Software/Hardware used:
software
ASKED: March 25, 2011  5:51 PM
UPDATED: March 28, 2011  9:21 PM

Answer Wiki

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

Before you do the call to the RPG program, just do CPYSPLF to copy a spoolfile to a DB file. Then you can read it in as any other file.

Discuss This Question: 2  Replies

 
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
  • NickHutcheson1
    DCL VAR(&FRLIB) TYPE(*CHAR) LEN(10) DCL VAR(&TOLIB) TYPE(*CHAR) LEN(10) DCL VAR(&JOB) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&NBR) TYPE(*CHAR) LEN(10) RTVJOBA JOB(&JOB) USER(&USER) NBR(&NBR) WRKJOBSCDE JOB(*ALL) OUTPUT(*PRINT) CPYSPLF FILE(QSYSPRT) TOFILE(QTEMP/JOBSCDE) + JOB(&NBR/&USER/&JOB) SPLNBR(*LAST)
    1,380 pointsBadges:
    report
  • TomLiotta
    The CPYSPLF suggestion is probably the best direction to go. That's the simple answer. The longer answer is that spooled files can't be read by RPG. In order for RPG to process the content of a spooled file, it must either call the Spooled File APIs to open, get and close the spooled file or read the data from some converted source such as output from CPYSPLF. Tom
    125,585 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