Solved

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

Posted on 2014-04-08
8
1,808 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:Amour22015
Comment Utility
Is there a way to copy & paste into???

Text file
Exel
Word


Thanks
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 18

Expert Comment

by:daveslash
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry that should be another topic...  Thanks
0
 

Author Closing Comment

by:Amour22015
Comment Utility
Thank You
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now