Writing Excel from Database File


This utility will take an iSeries database file and write it to an Excel spreadsheet. Test it with a small file before trying any large files. The source for the programs is included in the library WRTEXCEL, so if you have the inclination you can modify them to work differently/better. There are some improvements that could be made, such as checking for the existence of the file and library. But I use this command often and it works pretty well as is.


Load Instructions:


1. Unzip WrtExcel.zip


2. Create save file on iSeries

CRTSAVF QGPL/WRTEXCEL

3. Ftp save file to iSeries (You must have FTP authority on your iSeries)

C:\ftp

ftp> open 10.10.10.100 (your iSeries IP address)

Connected to 10.10.10.100.

220-QTCP at S1011111.

220 Connection will close if idle more than 5 minutes.

User (10.10.10.100:(none)): yourUserID (enter your as400 userid)

331 Enter password.

Password: (enter your password)

230 yourUserID logged on.

ftp> bin

200 Representation type is binary IMAGE.

ftp> put c:\ftp\wrtexcel.bin qgpl/wrtexcel (this assumes save files are in pc directory C:\ftp)

4. Restore library.

RSTLIB SAVLIB(WRTEXCEL) DEV(*SAVF) SAVF(QGPL/WRTEXCEL)


5. Copy WrtExcel command to QGPL library.

CRTDUPOBJ OBJ(WRTEXCEL) FROMLIB(WRTEXCEL) OBJTYPE(*CMD) TOLIB(QGPL)


You should now be able to key in WRTEXCEL at an iSeries command line, press F4 and see the following screen. Whatever IFS directory you specify must exist before running the command. The iSeries file and library must also exist. The command will not check for prior existence of files and libraries.


When you fill in the parameters and press enter the job will be submitted to batch. Please wait patiently for the job to finish.

============================================


Write Excel Spreadsheet (WRTEXCEL)

Type choices, press Enter.

File Name . . . . . . . . . . . ________ Name

Library Name . . . . . . . . . .________ Name

To IFS Path: . . . . . . . . . . '/HOME'

Set Col width to Header width . Y Character value


Hosted by www.Geocities.ws

1