100 pts.
 CL Program
Hello, I have these queries on a job schedule now and, I want to export them to excel using CL.. PGM RUNQRY MYENTRIES1 RUNQRY MYENTRIES2 COPYTOIMPF FROMFILE(MYLIB/MYFILE1) (MYLIB/FILE2) ENDPGM Where do I send these two file to? and can I run both queries this way? thanks,

Software/Hardware used:
ASKED: January 8, 2009  7:57 PM
UPDATED: January 9, 2009  11:17 AM

Answer Wiki:
Hi, The CPYTOIMPF command can place your output files from your queries into a stream file in the IFS for you. The IFS is a sort of network share which you can access from your PC or network server. You will need to run the CPYTOIMPF command for each file that your queries create. You will also need to check the parameters on the CPYTOIMPF command to get them correct for the type of file you want to use for excel (you can probably use the defaults to get comma delimited files) - there is plenty of help available on the command - press F1 for help - F2 for extended help. Regards, Martin Gilbert.
Last Wiki Answer Submitted:  January 9, 2009  11:15 am  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi,

You’ll probably also need to add a mapped drive to your PC or network server to access the IFS on your AS400. You should be able to do this from windows explorer -> Tools – > Map Network Drive.

Regards,

Martin Gilbert.

 23,625 pts.