Solved

AS/400 - Printing Lists or Libraries, Files, Fields

Posted on 2014-04-08
8
1,881 Views
Last Modified: 2014-04-08
Hi and thanks,

Is there a way to print out or copy a list of: lets say all files that are in a library without having to copy & paste each screen shot???

Like if I go into:
Select and Sequence Files screen, there is a lot of files and would take alot of time to copy & paste.

Maybe create some SQL statement that would give me the same listings???

Thanks
0
Comment
Question by:Amour22015
  • 5
  • 3
8 Comments
 
LVL 18

Expert Comment

by:daveslash
ID: 39986461
As I posted in your other question, this should do it.

select table_schema,
       table_name,
       SYSTEM_TABLE_NAME
  from SysTables

select table_schema
       table_name,
       column_name,
       DATA_TYPE,
       LENGTH
  from SysColumns 

Open in new window


HTH,
DaveSlash
0
 

Author Comment

by:Amour22015
ID: 39986498
This is on the AS/400 so I am a little confused by the SQL Statement:

I would like a printout or copy of all files that are within a library???
so the only thing I would change in your sql would be:
table_name = The library name???
Or would it be:
table_name = file name and that would give me all the field names within a File???

Thanks
0
 
LVL 18

Accepted Solution

by:
daveslash earned 250 total points
ID: 39986522
The first query lists all tables (a.k.a. physical files) and schemas (a.k.a. libraries).

The second query lists all columns (a.k.a fields) in all tables and schemas.

HTH,
DaveSlash
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:Amour22015
ID: 39986790
Is there a way to copy & paste into???

Text file
Exel
Word


Thanks
0
 
LVL 18

Expert Comment

by:daveslash
ID: 39986816
If you're running in green-screen StrSQL, you can send all output to a printer-file (which can be easily sent to Word or Excel) by presseing F13 and changing the "SELECT output" to "Printer"

HTH,
DaveSlash
0
 

Author Comment

by:Amour22015
ID: 39986856
Ok,

this is what I did:

put the SQL Statement into the Strsql

pressed F13

Change Printer File
Printer file = QSYSPRT

<enter>

said job is printing

First I don't know were Qsysprt is linked to???
do I just change Qsysprt to Excel???

thanks
0
 

Author Comment

by:Amour22015
ID: 39986900
Sorry that should be another topic...  Thanks
0
 

Author Closing Comment

by:Amour22015
ID: 39986903
Thank You
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question