Solved

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

Posted on 2014-04-08
8
1,961 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

685 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