klophockey
Programmer
If anyone has some non-proprietary Cobol programs written to compile and run with Fujitsu Cobol, I would be greatly appreciate the opportunity to look them over to give me a better idea of the real world coding that works. I would be interested in looking at various examples and compiling, linking and running those program to learn about Fujitsu Cobol coding as I am absolutely new to this particular flavor
In particular, right now I am trying various things to get part of a program compiling right. Any input from you is most welcome. Thank you.
I thought I had the Select statement coded just fine for a file but it is not happy. Says SELECT clause must be a unique file-name in the description entry of FD. My code is shown below.
IDENTIFICATION DIVISION.
PROGRAM-ID. MYTEST.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT XYZ-file ASSIGN TO "XYZ"
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS XYZ001
ALTERNATE RECORD KEY IS XYZ001 XYZ002
FILE STATUS IS STATUS-XYZ
LOCK MODE IS AUTOMATIC.
DATA DIVISION.
FILE SECTION.
FD XYZ
LABEL RECORDS ARE STANDARD
RECORD CONTAINS 512 CHARACTERS GLOBAL.
01 REG-XZY.
05 XYZ001 PIC X(4).
05 XYZ002 PIC X(4).
05 XYZ003 PIC X(105).
05 XYZ004 PIC X(11).
05 FILLER PIC X(388).
In particular, right now I am trying various things to get part of a program compiling right. Any input from you is most welcome. Thank you.
I thought I had the Select statement coded just fine for a file but it is not happy. Says SELECT clause must be a unique file-name in the description entry of FD. My code is shown below.
IDENTIFICATION DIVISION.
PROGRAM-ID. MYTEST.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT XYZ-file ASSIGN TO "XYZ"
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS XYZ001
ALTERNATE RECORD KEY IS XYZ001 XYZ002
FILE STATUS IS STATUS-XYZ
LOCK MODE IS AUTOMATIC.
DATA DIVISION.
FILE SECTION.
FD XYZ
LABEL RECORDS ARE STANDARD
RECORD CONTAINS 512 CHARACTERS GLOBAL.
01 REG-XZY.
05 XYZ001 PIC X(4).
05 XYZ002 PIC X(4).
05 XYZ003 PIC X(105).
05 XYZ004 PIC X(11).
05 FILLER PIC X(388).