Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-04-08
8
Medium Priority
?
2,250 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:Dave Ford
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:
Dave Ford earned 1000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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:Dave Ford
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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
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 question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

972 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