Skip to content

Instantly share code, notes, and snippets.

@Edward-H
Edward-H / accountant.cob
Created February 28, 2017 22:22
Daily programmer #304 Easy Challenge solution in COBOL
>>SOURCE FREE
IDENTIFICATION DIVISION.
FUNCTION-ID. get-month-num.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 month-name-table-area VALUE "JANFEBMARAPRMAYJUNJULAUGSEPOCT"-
"NOVDEC".
03 month-name-table PIC X(3) OCCURS 12 TIMES.
@Edward-H
Edward-H / cobol-mode.el
Last active May 2, 2024 14:20
An Emacs mode for COBOL code. It features syntax highlighting for most modern dialects, indentation, support for free- and fixed-format code and code skeletons.
;;; cobol-mode.el --- Mode for editing COBOL code -*- lexical-binding: t; -*-
;; Copyright (C) 2013-2017 Edward Hart
;; Author: Edward Hart <edward.dan.hart@gmail.com>
;; Maintainer: Edward Hart
;; Version: 1.0.0
;; Created: 9 November 2013
;; Keywords: languages
@Edward-H
Edward-H / main.cob
Created August 21, 2013 13:10
COBOL solution to /r/dailyprogrammer's Challenge #132.
ID DIVISION.
PROGRAM-ID. assembler.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT asm-file ASSIGN "tiny.asm"
ORGANIZATION LINE SEQUENTIAL
FILE STATUS file-status
.
DATA DIVISION.