| 1 |
GNU >>SOURCE FORMAT IS FIXED |
| 2 |
Cobol *> *************************************************************** |
| 3 |
*> Purpose: Say hello to GNU Cobol |
| 4 |
Hello *> Tectonics: cobc -x bigworld.cob |
| 5 |
money *> *************************************************************** |
| 6 |
identification division. |
| 7 |
program-id. bigworld. |
| 8 |
|
| 9 |
DATA data division. |
| 10 |
working-storage section. |
| 11 |
01 hello pic $$$$,$$$,$$$,$$$,$$$,$$$.99. |
| 12 |
01 world pic s9(18)v99 value zero. |
| 13 |
|
| 14 |
01 people pic ZZZ,ZZZ,ZZZ,ZZ9. |
| 15 |
01 persons pic 9(18) value 7182044470. |
| 16 |
|
| 17 |
01 each pic 9(5)v99 value 26202.42. |
| 18 |
|
| 19 |
*> *************************************************************** |
| 20 |
CODE procedure division. |
| 21 |
|
| 22 |
multiply persons by each giving world |
| 23 |
on size error |
| 24 |
display "We did it. We broke the world bank" end-display |
| 25 |
end-multiply |
| 26 |
|
| 27 |
move world to hello |
| 28 |
move persons to people |
| 29 |
|
| 30 |
display "Hello, world" end-display |
| 31 |
display " " end-display |
| 32 |
display |
| 33 |
"On " function locale-date(20130927) |
| 34 |
" at " function locale-time(120000) |
| 35 |
", according to UN estimates:" |
| 36 |
end-display |
| 37 |
display |
| 38 |
"You were home to some " people " people," |
| 39 |
" with an estimated worth of " hello |
| 40 |
end-display |
| 41 |
|
| 42 |
goback. |
| 43 |
end program bigworld. |