PDA

View Full Version : SQL - Print



vin@planetchan.com
10-01-2002, 02:57 PM
I guess there are many different implementations of the SQL command. My command line allows me to type: RUNSQLSTM STM('SELECT * FROM CUSTOMER') OUTPUT(*OUTFILE) OUTFILE(MYFILE) The output then goes to file MYFILE. The output can also be directed to a spoolfile in a similar way.

nycsusan@hotmail.com
10-01-2002, 04:12 PM
You can change the default settings on your STRSQL session. After you enter STRSQL, then press F13. I am not at an AS/400 now, but I think the it's one of the first 3 options to change the output from DISPLAY to either PRINTER or OUTFILE.

nycsusan@hotmail.com
10-02-2002, 05:57 AM
Now that I am logged on to a 400, I can give you more specific directions. ==> STRSQL press F13=Services select 1. Change session attributes then SELECT output 1=Display, 2=Printer, or 3=File

lting@forestontrends.com
10-02-2002, 11:52 AM
Thank you, Vicent & Susan. What a BIG eye I am without looking carefully at F13=services. Thank you very much. Lee

Guest.Visitor
10-02-2002, 01:17 PM
Here's a trick I learned (plagerized?) a few weeks ago that works too. Create VIEW LIB/MYVIEW AS SELECT * FROM MYFILE Create TABLE LIB/MYTABLE like LIB/MYVIEW DROP VIEW LIB/MYVIEW CASCADE Chris

lting@forestontrends.com
11-27-2002, 03:38 AM
If I run SQL from AS/400 command line, say, SELECT * FROM CUSTOMER, is there a way (and/or SQL keyword)to direct the result to a spool file or a database file (something like the WRKQRY provides)? Thank you for your help. Lee

Guest.Visitor
11-27-2002, 03:38 AM
Your trick must work on OS/400 or above,I try it on V4R3,it's not at work .