QSYSPRT

40 pts.
Tags:
CPYSPLF
Microsoft Excel
QSYSPRT
Hi , A program generated two reports.There is a job that runs every monday , and these report are generated every week.They are copying the data in the report to a work file in Qtemp by the command CPYSPLF .Then they copy the records from work file to Qsysprt by CPYF. My queries are , is this QSYSPRT retains the records permanently , that is any time can we access these records? Also i want these records in an EXcel sheet .pLease clarify
ASKED: February 29, 2012  1:49 PM
UPDATED: March 26, 2014  2:05 AM

Answer Wiki

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

QSYSPRT is a print file that is used for generating the reports, so you will not be able to pull the data from there again.

As far as getting the reports in excel, you can access the the outq using iNav and convert them to a text file by dragging them to your desktop. You can then open the text file in excel.

A more elegant solution would be to access the files used to create the reports and generate your own excel documents using the POI API’s.

Discuss This Question: 3  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
  • TomLiotta
    ...is this QSYSPRT retains the records permanently , that is any time can we access these records? Also i want these records in an EXcel sheet .pLease clarify QSYSPRT is a printer file. It is used as a kind of "template" for generating output to a printer. When a file is copied to QSYSPRT, the result is a spooled file in the spooling subsystem. If it's not set to print immediately, then it is waiting for someone to route to a printer. Why go after some printed report with Excel instead of pulling the data that goes into the report directly into Excel? But the question of whether or not the QSYSPRT data will be available at any future time is totally up to your AS/400 people. We have no way of knowing what happens to spooled files on your system nor if you even have authority (or capability) to retrieve them. And whether you can get the report into Excel is also up to your AS/400 people. It's not a particularly difficult procedure, but it does require running a couple commands on the AS/400 at the very least. If you don't know the parameters needed for each individual report and it needs to be automated, then it takes some programming, too. Personally, I always prefer just using ODBC and downloading data straight into Excel. Tom
    125,585 pointsBadges:
    report
  • Shobi
    Thanks , i hav got idea now. i have another question which is for my knowlegde. Qsysprt does not know , what are the fields, attributes of the fields then how is that it is generating to the report similar to the file structure?
    40 pointsBadges:
    report
  • TomLiotta
    ...how is that it is generating to the report similar to the file structure? QSYSPRT is just a generic report format that only defines a long print line with no fields. Programs that create printed output with QSYSPRT are responsible for placing data at different columns along the print line. Actually, QSYSPRT generally shouldn't be used. It's actually an IBM printer file, and it can be changed by IBM at any time. Instead of QSYSPRT, a printer file should be created and used in its place. However, QSYSPRT is the file that is used by the CPYF command when output is directed to *PRINT, so it is commonly seen. Any data stored in a spooled file can be retrieved for as long as the spooled file remains on the system. The data just needs to be extracted as substrings from each print line. 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