View previous topic :: View next topic
|
Author |
Message |
Vignesh Sid
New User
Joined: 04 Sep 2017 Posts: 43 Location: India
|
|
|
|
I am working on a DB2 batch module which involves MQ handling. There are two copybooks (one for test and another for prod) declared under a 01- variable as follows:
01 MQM-OBJECT-DESCRIPTOR EXTERNAL.
PROD COPY TECMQODL.
TEST * COPY CMQODL.
EJECT
The above two copybooks are different in length and layout though there are some common variables too....
This 01- variable can take only one copybook at a time either prod or test. I have passed a parameter to this module to determine environment is test or prod.
Using this parameter, is there any way to select the desired copybook generically, instead of commenting every time? In short can I use the test or prod copybook as 88- variable.....
Please let me know for any possible solution.
Thanks in advance! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
NO SOLUTION and pretty inconsiderate approach
You want to run in prod something different from what You have tested |
|
Back to top |
|
|
Vignesh Sid
New User
Joined: 04 Sep 2017 Posts: 43 Location: India
|
|
|
|
Thanks Enrico for quick reply. The two copybooks are not entirely different. It has the same variables except copybook CMQODL has been temporarily changed to have the version 3 layout of 336 bytes as opposed to the latest layout of version 4 with 400 bytes.
So Its not entirely different in Prod from test. For example we can consider both the copybooks are for test and I need to select between the two based on the desired parameter. So are there any chances of changing the way the 01- block is declared.
01 MQM-OBJECT-DESCRIPTOR EXTERNAL.
COPY TECMQODL.
* COPY CMQODL.
EJECT
Just a curiosity to find a solution! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
it does not matter what the differences are ...
You still want to run in production something different from what You have tested |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
1.You can keep same name but give different VALUES to them, will that work?
2. Talk to Scheduling team, they can set a parameter and pass on to the job based on environment.
3. You said it is DB2 then you can check like this,
Code: |
EXEC SQL
SELECT CURRENT SERVER
INTO :WS-SYS-NAME
FROM SYSIBM.SYSDUMMY1
END-EXEC
IF WS-SYS-NAME = PROD
copybook1
ELSE copybook2
END |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
they might still be running different things in different environments |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Quote: |
Using this parameter, is there any way to select the desired copybook generically, instead of commenting every time? In short can I use the test or prod copybook as 88- variable..... |
Am I missing something?
The program is already compiled. Copybook has already been determined before executing. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Quote: |
The program is already compiled. Copybook has already been determined before executing.
|
TS is passing the parameter run time to determine that. Or sometimes Ts is playing around commenting the code accordingly and that wants it to be automated. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
topic locked, getting nowhere |
|
Back to top |
|
|
|