Friday, March 14, 2014

Report Generation from DB2 Table on Z/Os using QMF EXPORT command

Many times we need to run queries in QMF. The steps below states how to generate report from QMF using EXPORT command.
Step1. Logon to QMF and run the query . Suppose we take a sample query like below
SELECT EMPNO,FNAME,LNAME
FROM EMPLOYEE                        
WHERE SALARY >= 10000
Once we run the query we will get the output in QMF.

EMPNO FNAME  LNAME
----------  ----------  ------------
0001      RYAN      ORLANDO
0002      MIKE      DUTCHER
0003      EN           BOSHER  


Step2.   Down below give the command  'EXPORT REPORT’  as shown below in the command line
EXPORT REPORT TO 'R0XXX.JCL.REPORT ' and press ENTER.
where R0XXX.JCL.REPORT is the dataset we want the QMF data to be put in.
Once done, we will get once notification indicating that the export was successful.
OK, REPORT was  exported to 'R0XXX.JCL.REPORT' . 

Step 3.   Report would contain some extra fields. We need to delete them





Then use the block command   ((16  and ((   to bring format the left alignment and you r done with ur report in ur dataset.

1 comment:

  1. Hi there everyone, it's my first pay a visit at this website, and article is
    really fruitful designed for me, keep up posting these types of articles or
    reviews.

    my website: Organizowanie wesel koło Warszawy

    ReplyDelete