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 to use a global variable in DB2 QMF

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

New User


Joined: 24 Nov 2006
Posts: 5
Location: Chennai

PostPosted: Tue Mar 29, 2011 1:03 pm    Post subject: How to use a global variable in DB2 QMF
Reply with quote

I need to modify all the headings in the reports generating from QMF PROCs. This heading will be available in a DB2 table. There will be many QMF reports in many batch jobs. How can I accomplish this? Please help
If I set a global variable and store the value from DB2 table, will this be available thorough out the batch job cycle?

Thanks in advance
Rahul
Back to top
View user's profile Send private message

chandracdac

New User


Joined: 15 Jun 2007
Posts: 92
Location: bangalore

PostPosted: Thu Mar 31, 2011 6:15 pm    Post subject: Reply to: How to use a global variable in DB2 QMF
Reply with quote

1. Prepare the header file separately.
2. Run you query thry JCL so that you will get the data in output file
3. Merge both files so that you will get the exact thing what you are expecting.

Thanks
Back to top
View user's profile Send private message
rahul_kk

New User


Joined: 24 Nov 2006
Posts: 5
Location: Chennai

PostPosted: Thu Mar 31, 2011 7:56 pm    Post subject: Reply to: How to use a global variable in DB2 QMF
Reply with quote

Thanks for your reply. We have program name, header name, date and time in the first line. So, I have done this in another way. Created a stored procedure (a cobol program gets this heading and send it as OUT parameter to stored procedure).

1. Set global(heading_name='')
2. Call Stored_Procedure(&heading_name)
3. Mention this '&heading_name' in QMF Form (FORM.PAGE)

First 2 steps needs to be incorporated in all QMF PROCs before executing any SQL.

I tried this and is working fine.

Rahul KK
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 Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts OPC JCL Variable passion_sujesh IBM Tools 5 Fri Jul 01, 2016 4:21 am


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