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

Cobol option to hide some part of code


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jun 05, 2013 7:54 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 05, 2013 7:56 pm
Reply with quote

what do You mean by <HIDE> ???
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jun 05, 2013 8:33 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 05, 2013 9:14 pm
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jun 05, 2013 9:27 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jun 05, 2013 11:15 pm
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Jun 06, 2013 12:03 am
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Jun 06, 2013 12:15 am
Reply with quote

Pandora-Box wrote:
There is another concern we don't maintain discrete cookbooks across levels

Sounds like a recipe for disaster icon_wink.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jun 06, 2013 12:20 am
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Jun 06, 2013 12:23 am
Reply with quote

No those were repercussions or advantage of the patch which eased some clock
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Jun 06, 2013 12:31 am
Reply with quote

Thanks Bill will try that CEEOPTS when I get back to my desk next week

Thanks for those pointers icon_smile.gif
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Thu Jun 06, 2013 2:37 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jun 06, 2013 3:50 am
Reply with quote

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:

Code:
// UPSI 1000000


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
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts run rexx code with jcl CLIST & REXX 15
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top