Page 1 of 2

Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 8:43 pm
by PuddinPie
Hello all,

I'm quite new at this and was hoping to get some help. I'm using PCOM and running a query that is producing an onscreen report. I was wondering if it's possible to copy the content's of the report and paste them into either the clipboard to be pasted later or even better into an excel document. I'm not sure how to accomplish this and any help would be greatly appreciated.


Thank you.

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 8:48 pm
by Akatsukami
Can you not copy and paste as you would from any other GUI window?

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 8:58 pm
by dick scherrer
Hello,

You might consider changing the query (depending on exactly what this is) to write to a data delimited file and then transfer the file to the pc to be used by Excel. A delimited file can be directly loaded into Excel.

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 9:13 pm
by PuddinPie
Once again i'm new to all of this. How would I change the query to write to a data delimited file?

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 9:23 pm
by Akatsukami
:roll: OK, let's drop back a couple-three steps.

You say that you are "running a query that is producing an onscreen report". You (presumably) log on to TSO and then do...what. Run an exec? Start ISPF and then run an exec? Run some SQL in SPUFI or QMF? Something else?

(And have you tried doing a vanilla copy-and-paste on PCOMM as I suggested?)

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 9:31 pm
by PuddinPie
I'm not sure what you mean by "a vanilla copy-and-paste" but if you mean actualy hilighting the area and pasting it then yes and it works fine. TSO>ISPF>SQL.

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 9:45 pm
by dick scherrer
Hello,

Good to hear you have what you wanted - for this go-round :)

If this is a one-time requirement, i suspect you have completed it. If this is to be done regularly, i suspect you will want to look into automating the process - doing this manually over and over is not a very good use of time.

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 10:22 pm
by PuddinPie
That's what I'm trying to do is automate it. I dont know how to get the information that is produced in the report to export or atleast copy to clipboard so that it can be put into an excel file.

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 10:30 pm
by dick scherrer
Hello,

Are you familiar with how to run TSO in batch?

You could run the query in a batch job or you could unload the data you want via db2.

Re: Capturing everything in a report from a built query.

PostPosted: Thu Dec 13, 2012 10:37 pm
by Akatsukami
Ah, you don't want the report; you want the data in the report; instead of
 12/13/2012                       KatsuSoft     
                             Widget Sales Report
                                               
          Arnor     Gondor    Rohan     Mordor 
          ========  ========  ========  ========
 01/3019        53     1,009       237    69,666
 02/3019        48       997       185   108,087
 03/3019       265     3,218       402    75,123
 04/3019      1,234   11,517      6,010        1

you want
"01/3019", 53 "1,009", 237,"69,666"
"02/3019",48,997,185,"108,087"
"03/3019",265,"3,218",402,"75,123"
"04/3019","1,234","11,517","6,010",1

OK, so you are running SQL; in SPUFI or QMF?