Capturing everything in a report from a built query.



IBM's flagship relational database management system

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

Postby PuddinPie » Thu Dec 13, 2012 11:55 pm

It's QMF.
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 » Fri Dec 14, 2012 12:45 am

You have to learn to not be so reticent with those trying to help, Purin-chan.

Now, my client eigty-sixed QMF a few years ago, so I can't look at it myself, but ISTR that from the command line one executed either RUN QUERY object or RUN PROC object. If a PROC, there is a RUN QUERY object command embedded in it. The query can be displayed by entering DISPLAY QUERY object on the command line, or exported by EXPORT QUERY object TO data-set.

When you've gotten the SQL for your query, there are a number of ways to run it. Have you a preference?
"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: 1058
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 » Fri Dec 14, 2012 2:17 am

I'm not trying to be reticent i just dont know what axactly to say or how to answer a questing some times. I'm going to see if I can get access to the coding of the query and let you know if not for anything then for an update atleast.

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.

Postby PuddinPie » Fri Dec 14, 2012 2:26 am

The querey is:
 SELECT DPDT, CEDT, CMAN, MSCD, FLMN
 FROM INDI.AGRT                     
 --WHERE CMAN='      '               
 --WHERE MSCD='      '               
 *** END ***                         


What would I be adding to tell it to copy or output the information?

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.

Postby dick scherrer » Fri Dec 14, 2012 2:48 am

Hello,

I'm not trying to be reticent i just dont know what axactly to say or how to answer a questing some times. I'm going to see if I can get access to the coding of the query
Yup, happens fairly often ;)

Not to worry - we'll get thru.

QMF is not available on these systems, but i believe there is a way to show the actual sql of the query.

One easy way to get what i believe you want is to code your query as:
 SELECT DPDT, '|', CEDT, '|', CMAN, '|', MSCD, '|', FLMN
 FROM INDI.AGRT                     
 --WHERE CMAN='      '               
 --WHERE MSCD='      ' 

If the pipe '|' will not work for you, use some other character that will not be in the data.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby Akatsukami » Fri Dec 14, 2012 3:10 am

(Oops. Didn't see Purin-chan's last response :oops: )
Last edited by Akatsukami on Fri Dec 14, 2012 3:13 am, edited 1 time in total.
"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: 1058
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 Akatsukami » Fri Dec 14, 2012 3:12 am

PuddinPie wrote:The querey is:
 SELECT DPDT, CEDT, CMAN, MSCD, FLMN
 FROM INDI.AGRT                     
 --WHERE CMAN='      '               
 --WHERE MSCD='      '               
 *** END ***                         


What would I be adding to tell it to copy or output the information?

Thank you.

Run in DSNTIAUL; ask your senpai for JCL.
"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: 1058
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 GuyC » Wed Dec 19, 2012 3:24 pm

//STEP1    EXEC PGM=DSNUTILB,REGION=6M,     
//             PARM=(ssid,'MyUtil')           
//*                                         
//SYSUNL1  DD  DSN=xxxxxx,
//             DISP=(MOD,CATLG,DELETE),     
//             UNIT=SYSDA,                 
//             SPACE=(TRK,(5,1),RLSE)       
//SYSPRINT DD  SYSOUT=*
//UTPRINT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSREC   DD  DUMMY   
//SYSIN    DD  *       
UNLOAD TABLESPACE databasename.tablespacename
FROM TABLE INDI.AGRT (DPDT, CEDT, CMAN, MSCD, FLMN )   
WHEN (CMAN='      ')
LIMIT 10000                                                       
DELIMITED NOPAD COLDEL ';' CHARDEL '"' DECPT '.'

/*
I can explain it to you, but i can not understand it for you.
GuyC
 
Posts: 315
Joined: Tue Aug 11, 2009 3:23 pm
Has thanked: 1 time
Been thanked: 4 times

Previous

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post