#!/bin/bash -e PROG=qsort-gnu # # In GNU Cobol, The SELECT statement looks in the environment for # the "assinged-to" identifiers prefix by "DD_". # Similar to JCL DD statement. # export DD_qsortin=qsortin.txt export DD_qsortout=qsortout.txt # # Build. Tested with GNU Cobol 2.2. # (Using ".elf" for executables is a local convention.) # set -x rm -f *.elf cobc -std=cobol85 -x -o $PROG.elf $PROG.cob # # Run the program # ./$PROG.elf