IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts RC query -Time column CA Products 3
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top