CL Program
100 pts.
0
Q:
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,
ASKED: Jan 8 2009  7:57 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
23625 pts.
0
A:
 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0
  • AddThis Social Bookmark Button

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 Answered: Jan 9 2009  11:15 AM GMT by Gilly400   23625 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Gilly400   23625 pts.  |   Jan 9 2009  11:17AM GMT

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.

 
0