Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How can i redirect my output of a query in QMF into a PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kalyanonnet

New User


Joined: 24 Oct 2006
Posts: 3

PostPosted: Tue Oct 24, 2006 2:41 am    Post subject: How can i redirect my output of a query in QMF into a PDS
Reply with quote

Hi,

How can i redirect my output of a query in QMF into a PDS member.

Can i store a query in a QMF after exit?

Thanks,
Kalyan.V
Back to top
View user's profile Send private message

MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Oct 24, 2006 2:48 am    Post subject: Re: How can i redirect my output of a query in QMF into a PD
Reply with quote

You can execute QMF query/proc from a JCL and write output to a dataset.

You can press PF4 (PRINT) while you are viewing query output and this will print query result to you JES userid job in DSQPRINT. You can snap this output to a dataset.
Back to top
View user's profile Send private message
amitkb
Warnings : 1

New User


Joined: 21 Mar 2006
Posts: 3

PostPosted: Tue Oct 24, 2006 9:41 am    Post subject:
Reply with quote

You can also use EXPORT command.
While in QMF viewing the output execute this from the command line:
EXPORT TO 'DATASETNAME'.
You will get the query output in the dataset. You DON'T need to create this dataset in advance.

Regards,
Amit Bhat.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Sat Nov 04, 2006 3:44 pm    Post subject:
Reply with quote

hi there,

u can use SAVE AS command in QMF to save a query.
as for the output, u can use EXPORT DATA TO or EXPORT REPORT TO commands based on ur need.
Back to top
View user's profile Send private message
prodigy

New User


Joined: 15 May 2006
Posts: 28

PostPosted: Wed Nov 22, 2006 1:02 pm    Post subject:
Reply with quote

Hi,

I tried the EXPORT command. But the result is getting truncated in one particular column when i exported it to a dataset. The column is Varchar(5000). But QMF scren shows the entire content. Can anybody tell me how to extract the entire report??
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Wed Nov 22, 2006 8:20 pm    Post subject: Re: How can i redirect my output of a query in QMF into a PD
Reply with quote

Alternately you can use DSNTIAUL to dump table rows

Code:


//STP0100  EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT)               
//SYSREC00 DD DSN=TABLE.DOWNLOAD,                 
//             DISP=(,CATLG,DELETE),                               
//             UNIT=SYSDA,                                         
//             SPACE=(CYL,(1,1),RLSE),DCB=(MODEL.DSCB1,BLKSIZE=0) 
//SYSPUNCH DD  DUMMY                                               
//SYSTSPRT DD  SYSOUT=*                                           
//SYSPRINT DD  SYSOUT=*                                           
//SYSUDUMP DD  SYSOUT=*                                           
//SYSTSIN  DD  *                                                   
 DSN SYSTEM(DB2S)                                                 
 RUN  PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL')               
 END                                                               
/*                                                                 
//SYSIN    DD *                                                   
  SELECT * FROM TABLE.NAME                         
    ;                                                             
/*                                                                 
//*                                                               
Back to top
View user's profile Send private message
Sreedhar.P

New User


Joined: 08 Dec 2006
Posts: 2
Location: bangalore

PostPosted: Mon Dec 11, 2006 7:16 pm    Post subject: Hi there
Reply with quote

Can you use the below command.

EXPORT REPORT TO DYYMMDD.TABLENAME.Rx (D=HTML

WHERE DYYMMDD = DATE ,

TABLENAME = TABLE for u r taking the report.

Rx=report . eg : R1 , R2 etc
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us