Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us