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

How to use a global variable in DB2 QMF


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

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top