View previous topic :: View next topic
|
Author |
Message |
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Is there a cobol option that could allow us to hide some part of code across different level?
Level here means Dev,test,uat,prod
And I use SCLM for version control
Also if there is some kind of option exist does it need to be done along at the time of some setup? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
what do You mean by <HIDE> ??? |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
For example :
If have added some displays and not have removed I dont want them to be shown in prod but made available in lower regions |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you could use the D in column 7 and in the the 'with debugging mode' in the SOURCE COMPUTER para.
but then you have to remove (or comment-out) the 'with debugging mode'
before you compile for the prod version.
otherwise there is nothing you can do,
except of course add a file with a record that you would always have to check (in prod as well as test).
unfortunately there is nothing you can do to tell the compiler (other than compiler options)
to do something.
D in 7 is treated as a comment when the 'with debugging mode' is not present in the source.
the lines will still be in the source, but do not generate any object code.
with a d in 7, you can lay any code that you want. object is generated with the 'with debugging mode' clause,
and without the clause, the D in 7 is treated as an asterisk (*) by the compiler
unfortunately, most resource products move the latest object and do not create a new one upon entry to another 'region' (test prod, etc..).
if you have no debugging tool in-house, then displays are one of the few means of debugging that you have.
on the other hand, if you have a production problem, without the displays you are still canoeing without a paddle. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
The Biggest concern we have is that too many changes external interfaces involed for couple of them we have no control atleast my team perspective and too much of business case involved so its a crunchy situation that even 70% ok code is ok to be in prod so for the rest of 30% not ok code I need displays
I heard of the option D but never tried it yet
Thanks for the inputs Dick |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Perhaps if you put the SOURCE-COMPUTER in a copybook. In Production source, the copybook can just contain a comment explaining that there is nothing there ("This Copybook Intentionally Left Blank").
Then in the other environments, the copybook contains the appropriate SOURCE-COMPUTER paragraph.
When promoting to Production, the copybook just never makes its... and the D lines are treated as comments in the Production compile. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
There is another concern we don't maintain discrete cookbooks across levels so I am afraid or I did not get your point correctly
Due to the patch we made in SCLM in our shop we compile only once in user level rest of the level we just move to next levels |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Pandora-Box wrote: |
There is another concern we don't maintain discrete cookbooks across levels |
Sounds like a recipe for disaster |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Wow, don't tell the Auditors :-)
Can you recreate any given source from, say, two years four months and three days ago, and guarantee that when compiled the object code is identical to the Production object code at that time? I suspect not.
Fail of a Computer Audit, without looking anywhere further.
Anyway, the Ds won't work then.
The "Debugging Declaratives" might give you something, because they can be set on/off by an option (in various ways, my preference being CEEOPTS DD statement). There is some "performance" penalty if turning off what has been compiled in, because a switch needs to be tested for every reference/use of a paragraph/SECTION. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
No those were repercussions or advantage of the patch which eased some clock |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Thanks Bill will try that CEEOPTS when I get back to my desk next week
Thanks for those pointers |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
I'm looking for a CICS program I did this to and I cannot find it. It was basically an "IF" statement. I can't even remember the situation now. If I come accorss it I'll let ya know.
if "prod"
do-something
else
do-something-else
end-if |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Perhaps UPSI.
This is one byte of on/off values (0-7) which you can interrogate from COBOL and set in the JCL.
Looked like this when I used it last:
But that was on DOS/VS
It is now something the LE provides, so again can be set through the various LE Options possibilities and tested in a program:
Code: |
IF Testing-Environment
do something
END-IF |
You then establish Testing-Environment and relate it to the UPSI in the SPECIAL-NAMES paragraph of the ENVIRONMENT DIVISION.
You have eight on/off switches, which you could use for your different environments, or just have Prod/Non-Prod or even get into combinations of the settings which would give a total of 256 possibilities :-)
This may be less "intrusive" that having a file as dbz suggested (can be a simple DD * anyway) or a PARM. |
|
Back to top |
|
|
|