This format was used by the JSP-Cobol application produced by Michael Jackson Systems Limited. It is formatted similarly to a COBOL file, but divided into a number of PRGM blocks, each of which has an OPERATIONS list, and a STRUCTURES section. There is also an overall header and optional MI (Module Implementation) and FI (File Implementation) sections. The STRUCTURES section describes the program structure using blocks that are opened by one of the following keywords, and closed by an END keyword (in addition conditional constructs have the condition text appended to the line).
Below is a an example of a JSP-Cobol format structure file :-
/* This program prints out a table of Fibonacci numbers.
These are defined by a series in which any element is
the sum of the previous two elements. The program
stores the series in an array, and after calculating
it, prints the numbers out as a table.
*/
#include stdio.h
void main()
{
PRGM FIBONACCI.
OPERATIONS.
1.fib[0] = 0;
fib[1] = 1;
2.i = 2;
3.fib[i] = fib[i-1] + fib[i-2];
4.i = 0;
5.i++;
6.// Print each number and its Fibonacci product
printf("%3d %6d\n", i, fib[i]);
$ML &C1 =
i < 32
$MEND
STRUCTURES.
Fibonacci SEQ
Initialise SEQ
DO 1
Initialise END
Calculate SEQ
DO 2
DETAILS-3 ITR W (&C1)
Iteration_1 SEQ
DO 3
DO 5
Iteration_1 END
DETAILS-3 END
Calculate END
Display SEQ
DO 4
DETAILS-5 ITR W (&C1)
Iteration_2 SEQ
DO 6
DO 5
Iteration_2 END
DETAILS-5 END
Display END
Fibonacci END