Need Advice How to Increase FD layout to Existing Program
Posted: Fri Dec 07, 2012 11:26 pm
Hello everyone. I am having a tough time understanding how to increase a layout of an existing program. I'll try and explain. Its probably really simple for you experts out there.
So I have a program that has been already written. I have a database called data1.dat
IDENTIFICATION DIVISION.
PROGRAM-ID.
AUTHOR.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER.
OBJECT-COMPUTER.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT MASTER-RECORD ASSIGN TO "C:\DATA1.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
LOCK MODE IS MANUAL
STATUS IS FILE-LOCK
RECORD KEY IS SSN.
DATA DIVISION.
FILE SECTION.
FD DATABASE LABEL RECORDS ARE STANDARD.
01 MASTER-RECORD.
05 FILLER PIC XXX.
05 SSN PIC X(9).
05 FIRST NAME PIC X(30).
05 LAST NAME PIC X(30).
05 ADDRESS PIC X(30).
05 FILLER PIC X(2).
So now the person want to add more to the master-record. Like include country and city. So the FD only has 2 space filler at the end so I have to increase it. If I increase it, I might as well increase it by a lot so I have room in the future for growth.
So how would I go about doing that?
I'm not an expert in cobol as you can see so any help is very much appreciated.
Please let me know what you think. Thank you so much.
So I have a program that has been already written. I have a database called data1.dat
IDENTIFICATION DIVISION.
PROGRAM-ID.
AUTHOR.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER.
OBJECT-COMPUTER.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT MASTER-RECORD ASSIGN TO "C:\DATA1.DAT"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
LOCK MODE IS MANUAL
STATUS IS FILE-LOCK
RECORD KEY IS SSN.
DATA DIVISION.
FILE SECTION.
FD DATABASE LABEL RECORDS ARE STANDARD.
01 MASTER-RECORD.
05 FILLER PIC XXX.
05 SSN PIC X(9).
05 FIRST NAME PIC X(30).
05 LAST NAME PIC X(30).
05 ADDRESS PIC X(30).
05 FILLER PIC X(2).
So now the person want to add more to the master-record. Like include country and city. So the FD only has 2 space filler at the end so I have to increase it. If I increase it, I might as well increase it by a lot so I have room in the future for growth.
So how would I go about doing that?
I'm not an expert in cobol as you can see so any help is very much appreciated.
Please let me know what you think. Thank you so much.