Page 2 of 2

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

PostPosted: Thu Dec 13, 2012 11:55 pm
by PuddinPie
It's QMF.

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

PostPosted: Fri Dec 14, 2012 12:45 am
by Akatsukami
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?

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

PostPosted: Fri Dec 14, 2012 2:17 am
by PuddinPie
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.

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

PostPosted: Fri Dec 14, 2012 2:26 am
by PuddinPie
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.

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

PostPosted: Fri Dec 14, 2012 2:48 am
by dick scherrer
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.

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

PostPosted: Fri Dec 14, 2012 3:10 am
by Akatsukami
(Oops. Didn't see Purin-chan's last response :oops: )

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

PostPosted: Fri Dec 14, 2012 3:12 am
by Akatsukami
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.

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

PostPosted: Wed Dec 19, 2012 3:24 pm
by GuyC
//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 '.'

/*