Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2014-04-08
8
1,918 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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 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…

790 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