Capturing everything in a report from a built query.



IBM's flagship relational database management system

Capturing everything in a report from a built query.

Postby PuddinPie » Thu Dec 13, 2012 8:43 pm

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.
PuddinPie
 
Posts: 20
Joined: Wed Sep 15, 2010 1:51 am
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby Akatsukami » Thu Dec 13, 2012 8:48 pm

Can you not copy and paste as you would from any other GUI window?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby dick scherrer » Thu Dec 13, 2012 8:58 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

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

Postby PuddinPie » Thu Dec 13, 2012 9:13 pm

Once again i'm new to all of this. How would I change the query to write to a data delimited file?
PuddinPie
 
Posts: 20
Joined: Wed Sep 15, 2010 1:51 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby Akatsukami » Thu Dec 13, 2012 9:23 pm

: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?)
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby PuddinPie » Thu Dec 13, 2012 9:31 pm

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.
PuddinPie
 
Posts: 20
Joined: Wed Sep 15, 2010 1:51 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Thu Dec 13, 2012 9:45 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

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

Postby PuddinPie » Thu Dec 13, 2012 10:22 pm

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.
PuddinPie
 
Posts: 20
Joined: Wed Sep 15, 2010 1:51 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby dick scherrer » Thu Dec 13, 2012 10:30 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

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

Postby Akatsukami » Thu Dec 13, 2012 10:37 pm

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?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Next

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post