check hard codes

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

check hard codes

Postby meg123 » Tue Oct 06, 2015 1:35 pm


I have 100 cobol programs and I wanted to check if there are hard codes present in the programs.
What are the different ways to make such check.

Posts: 1
Joined: Tue Oct 06, 2015 12:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: check hard codes

Postby BillyBoyo » Tue Oct 06, 2015 1:38 pm

Not really, unless you have a tool. Also depends on what you mean by "hard codes" exactky. If you mean literals in the PROCEDURE DIVISION that is one thing, if you mean literals in the DATA DIVISION that is another.
Global moderator
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: check hard codes

Postby prino » Tue Oct 06, 2015 11:36 pm

If you have a list of all "hard codes", an edit macro might be useful, just X ALL and do a F "hardcode" for all "hard codes".

That how we did our Y2K conversion, where the list of "hard codes" was a list of fields containing dates. Our check (and if required, convert) rate was about 40 to 80 programs per day...
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
Posts: 624
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Return to IBM Cobol


  • Related topics
    Last post