fork download
  1. identification division.
  2. program-id. write-html.
  3. environment division.
  4. input-output section.
  5. file-control.
  6. select html-file assign to "output.html"
  7. organization is line sequential.
  8. data division.
  9. file section.
  10. fd html-file.
  11. 01 html-line pic x(255).
  12.  
  13. working-storage section.
  14. 01 ws-crlf pic x(2) value x"0D0A".
  15.  
  16. procedure division.
  17. main.
  18. open output html-file
  19. move "<DOCTYPE! html>" to html-line
  20. write html-line
  21. move "<html lang=""ja"">" to html-line
  22. write html-line
  23. move "<head>" to html-line
  24. write html-line
  25. move "<meta charset = ""UTF-8"">" to html-line
  26. write html-line
  27. move "<title>タイトル</title>" to html-line
  28. write html-line
  29. move "</head>" to html-line
  30. write html-line
  31. move "<body>" to html-line
  32. write html-line
  33. move "Hello HTML!" to html-line
  34. write html-line
  35. move "</body>" to html-line
  36. write html-line
  37. move "</html>" to html-line
  38. write html-line
  39. close html-file
  40. display "HTML file 'output.html' has been written successfully."
  41. stop run.
  42.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cob: 1: error: invalid indicator 'f' at column 7
prog.cob: 4: error: invalid indicator 'o' at column 7
prog.cob: 5: error: invalid indicator 'o' at column 7
prog.cob: 7: error: invalid indicator 'z' at column 7
prog.cob: 8: error: invalid indicator 'i' at column 7
prog.cob: 9: error: invalid indicator 'e' at column 7
prog.cob: 10: error: invalid indicator 'l' at column 7
prog.cob: 11: error: invalid indicator 'l' at column 7
prog.cob: 13: error: invalid indicator 'g' at column 7
prog.cob: 14: error: invalid indicator 'c' at column 7
prog.cob: 16: error: invalid indicator 'u' at column 7
prog.cob: 18: error: invalid indicator 'u' at column 7
prog.cob: 19: error: invalid indicator '<' at column 7
prog.cob: 20: error: invalid indicator 'h' at column 7
prog.cob: 21: error: invalid indicator '<' at column 7
prog.cob: 22: error: invalid indicator 'h' at column 7
prog.cob: 23: error: invalid indicator '<' at column 7
prog.cob: 24: error: invalid indicator 'h' at column 7
prog.cob: 25: error: invalid indicator '<' at column 7
prog.cob: 26: error: invalid indicator 'h' at column 7
prog.cob: 27: error: invalid indicator '<' at column 7
prog.cob: 28: error: invalid indicator 'h' at column 7
prog.cob: 29: error: invalid indicator '<' at column 7
prog.cob: 30: error: invalid indicator 'h' at column 7
prog.cob: 31: error: invalid indicator '<' at column 7
prog.cob: 32: error: invalid indicator 'h' at column 7
prog.cob: 33: error: invalid indicator 'H' at column 7
prog.cob: 34: error: invalid indicator 'h' at column 7
prog.cob: 35: error: invalid indicator '<' at column 7
prog.cob: 36: error: invalid indicator 'h' at column 7
prog.cob: 37: error: invalid indicator '<' at column 7
prog.cob: 38: error: invalid indicator 'h' at column 7
prog.cob: 39: error: invalid indicator 'h' at column 7
prog.cob: 40: error: invalid indicator 'y' at column 7
prog.cob: 41: error: invalid indicator 'u' at column 7
prog.cob: 6: error: CONFIGURATION SECTION header missing
prog.cob: 6: error: SPECIAL-NAMES header missing
prog.cob: 6: error: invalid system-name 'html-file'
prog.cob: 6: error: syntax error, unexpected ASSIGN, expecting CRT or Identifier
prog.cob: 6: error: syntax error, unexpected TO
stdout
Standard output is empty