Validating numeric fields in cobol Fresno webcams personals


30-Jan-2020 19:36

Note: The code accompanying this article is available for download here, and it has been updated since it originally ran [Updated 06/13/07] I have seen requests many times in the forums from programmers asking how best to handle data with invalid decimal data.Typically this type of error is first discovered when a program ends abnormally.These days, CPU cycles are cheap, man-hours are expensive.

I like you indentation scheme of going in 2 for the WHEN and then going to a new line and indenting 2 more for the MOVE (or whatever will be done). I'm not sure just where I got the particular scheme I show here. Working in a few COBOL shops I always tried to mirror the style of the area I was in - if they had a consistent or official style guide. I am validating a file field with reference modification with the evaluate statement. for ex: Evaluate value(1:6) when 1 do something when 2 do something when other do some other thing end-evaluate.

004310 004320 EVALUATE PLANET-NUMBER 004330 WHEN 1 MOVE "Mercury" TO PLANET-NAME 004340 WHEN 2 MOVE "Venus " TO PLANET-NAME 004350 WHEN 3 MOVE "Earth " TO PLANET-NAME 004360 WHEN 4 MOVE "Mars " TO PLANET-NAME 004370 WHEN 5 MOVE "Jupiter" TO PLANET-NAME 004380 WHEN 6 MOVE "Saturn " TO PLANET-NAME 004390 WHEN 7 MOVE "Uranus " TO PLANET-NAME 004400 WHEN 8 MOVE "Neptune" TO PLANET-NAME 004410 WHEN 9 MOVE "Pluto " TO PLANET-NAME 004420 WHEN OTHER MOVE " " TO PLANET-NAME 004430 END-EVALUATE.

004440 004310 004320 EVALUATE PLANET-NAME 004330 WHEN "Mercury" MOVE 1 TO PLANET-NUMBER 004340 WHEN "Venus " MOVE 2 TO PLANET-NUMBER 004350 WHEN "Earth " MOVE 3 TO PLANET-NUMBER 004360 WHEN "Mars " MOVE 4 TO PLANET-NUMBER 004370 WHEN "Jupiter" MOVE 5 TO PLANET-NUMBER 004380 WHEN "Saturn " MOVE 6 TO PLANET-NUMBER 004390 WHEN "Uranus " MOVE 7 TO PLANET-NUMBER 004400 WHEN "Neptune" MOVE 8 TO PLANET-NUMBER 004410 WHEN "Pluto " MOVE 9 TO PLANET-NUMBER 004420 WHEN OTHER MOVE 0 TO PLANET-NUMBER 004420 END-EVALUATE.

Values for each zone and digit can range from 0 to 9 and A to F for the values 0 to 15 in the base-16 (hexadecimal).

The base-10 (decimal) numbers 0 to 9 are defined for zoned-decimal fields in hex as F0-F9, respectively. For this byte only, the zone portion can be either a C or F for positive values and a D for negative.

For example, a “7p 2” field is stored in (7 1) / 2 = 4 bytes.



Lauren Graham and Vanessa previously worked together on Gilmore Girls.… continue reading »


Read more

To get started, Her Campus has put together a list of the DOs and DON’Ts of college dating.… continue reading »


Read more

white girls and black men middle school dating advice!… continue reading »


Read more