Home > Archive > Cobol > August 2006 > Crazy COBOL system, need help with cob2csv
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Crazy COBOL system, need help with cob2csv
|
|
| Starkey2600@gmail.com 2006-08-17, 6:55 pm |
| I've just been hired at a new company, and with this new job comes a
new database system for me to update. They now have a custom built
COBOL software running their db, as I'm not the slightest bit
accustomed to COBOL, having only been born in 83 :).
I have however been reading up quite a bit on the situation I'm in, as
it seems as if there are others in very similar ones. However I
haven't noticed one quite like mine. This system was built in the
early 80's and was designed and written by one man who has since passed
away. Unfortunately it doesnt seem that this gentleman designed by the
same set of rules that most did during the "COBOL Era" as I've seen
mention of copybook files and a seperate file for the db, however, the
system I'm working with is made up of lots and lots of .CBL, files that
contain a section of the code that appears to be the copybook, and then
the source. Then there are lots and lots of these files with no
extensions, but they appear to be binary db files, as i can make out
some of the plain text as db items.
So my question is how can I use cob2csv with this system? Do i copy
paste the copybook section into a seperate file?
Please, Please Help!!!
| |
| Alistair 2006-08-17, 6:55 pm |
|
Starkey2600@gmail.com wrote:
> I've just been hired at a new company,
> Unfortunately it doesnt seem that this gentleman designed by the
> same set of rules that most did during the "COBOL Era" as I've seen
> mention of copybook files and a seperate file for the db, however, the
> system I'm working with is made up of lots and lots of .CBL, files that
> contain a section of the code that appears to be the copybook, and then
> the source. Then there are lots and lots of these files with no
> extensions, but they appear to be binary db files, as i can make out
> some of the plain text as db items.
>
> So my question is how can I use cob2csv with this system? Do i copy
> paste the copybook section into a seperate file?
>
cob2csv was written (assuming that it is the same program) by Robert
Wagner. He may (possibly) be contactable on robert@wagner.net. My
understanding of the source (after spending a whopping 5 minutes
looking at it) is that you use a cbl file copybook tagged with the cpy
suffix as an input file to the program. It will interpret the FD and
use it as a guide for the program.
Cob2csv is written in MicroFocus Cobol but should be easily converted
to any other brand of Cobol. Robert Wagner posted the following:
<QUOTE>
You'll probably have to read it with a Cobol program compiled with MF
or a MF file tooll. If you still have access to the MS compiler or a
more recent MF compiler, cob2csv I posted here some months ago will do
the job. You'll need a Cobol copybook (include file) describing the
record layout.
IDX is an index you probably don't need. IND is the data you want. Try
editing the IND with a text editor; do the records line up? In the
unlikely event they do, it's C-ISAM and you might be able to read it
as ASCII text.
</QUOTE>
Within the code he wrote:
<QUOTE 2>
* Convert Cobol file to comma or tab delimited
*
* This program interprets a Cobol copybook describing a record layout,
* then converts the file to either csv or tsv (comma or tab delimited).
*
* This program would best be used by the organization sending the file,
* because it has a Cobol compiler and could better deal with
* ideisyncrasies in its file system. When used by the organization
* receiving the file, the program need be compiled only once. The
* executable will convert all files.
*
* This program also provides a simple demo of how to parse
* and interpret source code.
*
* Copybook file: cob2csv.cpy **!!!!!!!****
* Input data file: cob2csv.in
* Output data file: cob2csv.out
* Environment variable: delimiter=tab (default is comma)
* This program filters out data characters matching the delimiter.
* Supported formats: string, display numeric, binary and packed
decimal,
* simple OCCURS. REDEFINES is ignored, the first definition is used.
* Not supported: editing pictures, scaling, OCCURS at group level,
* OCCURS DEPENDING ON.
*
* If your machine is big-endian (a PC) or 32-bit, required changes
* are in comments below.
</QUOTE 2>
I tagged one line above with **!!!!!!**** (DD, could you check the
number of exclamation marks for me?) as this is where RW identifies the
copybook.
| |
|
| In article <1155839297.615540.192100@b28g2000cwb.googlegroups.com>,
Alistair <alistair@ld50macca.demon.co.uk> wrote:
[snip]
>* Copybook file: cob2csv.cpy **!!!!!!!****
[snip]
>I tagged one line above with **!!!!!!**** (DD, could you check the
>number of exclamation marks for me?) as this is where RW identifies the
>copybook.
Please do your own check-work.
DD
| |
| Starkey2600@gmail.com 2006-08-17, 6:55 pm |
| Thanks, that is a start. So what your saying is that i could just
rename the files that i have ( the ones with the copybook info) to have
a .cpy extension and then use them as the input files?
Alistair wrote:
> Starkey2600@gmail.com wrote:
>
>
> cob2csv was written (assuming that it is the same program) by Robert
> Wagner. He may (possibly) be contactable on robert@wagner.net. My
> understanding of the source (after spending a whopping 5 minutes
> looking at it) is that you use a cbl file copybook tagged with the cpy
> suffix as an input file to the program. It will interpret the FD and
> use it as a guide for the program.
>
> Cob2csv is written in MicroFocus Cobol but should be easily converted
> to any other brand of Cobol. Robert Wagner posted the following:
>
> <QUOTE>
>
> You'll probably have to read it with a Cobol program compiled with MF
> or a MF file tooll. If you still have access to the MS compiler or a
> more recent MF compiler, cob2csv I posted here some months ago will do
> the job. You'll need a Cobol copybook (include file) describing the
> record layout.
>
> IDX is an index you probably don't need. IND is the data you want. Try
> editing the IND with a text editor; do the records line up? In the
> unlikely event they do, it's C-ISAM and you might be able to read it
> as ASCII text.
>
> </QUOTE>
>
> Within the code he wrote:
>
> <QUOTE 2>
> * Convert Cobol file to comma or tab delimited
> *
> * This program interprets a Cobol copybook describing a record layout,
> * then converts the file to either csv or tsv (comma or tab delimited).
>
> *
> * This program would best be used by the organization sending the file,
>
> * because it has a Cobol compiler and could better deal with
> * ideisyncrasies in its file system. When used by the organization
> * receiving the file, the program need be compiled only once. The
> * executable will convert all files.
> *
> * This program also provides a simple demo of how to parse
> * and interpret source code.
> *
> * Copybook file: cob2csv.cpy **!!!!!!!****
> * Input data file: cob2csv.in
> * Output data file: cob2csv.out
> * Environment variable: delimiter=tab (default is comma)
> * This program filters out data characters matching the delimiter.
> * Supported formats: string, display numeric, binary and packed
> decimal,
> * simple OCCURS. REDEFINES is ignored, the first definition is used.
> * Not supported: editing pictures, scaling, OCCURS at group level,
> * OCCURS DEPENDING ON.
> *
> * If your machine is big-endian (a PC) or 32-bit, required changes
> * are in comments below.
>
> </QUOTE 2>
>
> I tagged one line above with **!!!!!!**** (DD, could you check the
> number of exclamation marks for me?) as this is where RW identifies the
> copybook.
| |
| Alistair 2006-08-18, 6:55 pm |
|
Starkey2600@gmail.com wrote:
> Thanks, that is a start. So what your saying is that i could just
> rename the files that i have ( the ones with the copybook info) to have
> a .cpy extension and then use them as the input files?
Errm, at the risk of commiting myself, I would guess that what you need
to do (after carefully reading the source comments and the emails in
this newsgroup written by RW himself - searchable under Google groups)
is:
1. Rename the source code FD copybook as a .cpy member.
2. Compile the source code that is called cob2csv.
3. Execute the compiled code using the cpy copybook as an input file.
4. Start worrying about that niggling doubt that sits in the back of
my mind about the
cob2csv program being the first of two steps (see the emails in
this group by RW).
5. Wonder why the code doesn't work. I may be maligning RW but I think
there may
have been some discussion about errors in the code. Check the
emails by RW.
[color=darkred]
> Alistair wrote:
| |
| Alistair 2006-08-18, 6:55 pm |
| I forgot to add this bit:
I am based in the UK but would love an all expenses paid holiday in the
US to fix it for you.
| |
| Starkey2600@gmail.com 2006-08-18, 6:55 pm |
| Hehe, thanks a lot for your input. If i had the finances to do so, at
this point i'd make it happen ;) This system is driving me crazy.
Alistair wrote:
> I forgot to add this bit:
>
> I am based in the UK but would love an all expenses paid holiday in the
> US to fix it for you.
| |
| Starkey2600@gmail.com 2006-08-25, 6:55 pm |
| Guys and Gals, if there is anyone out there that can help me out a bit,
i would so appreciate it. I have the source, i have the binary
datafiles, but i don't have copybooks, please, please help.
Starkey2600@gmail.com wrote:[color=darkred]
> Hehe, thanks a lot for your input. If i had the finances to do so, at
> this point i'd make it happen ;) This system is driving me crazy.
> Alistair wrote:
| |
| Richard 2006-08-25, 6:55 pm |
|
Starkey2600@gmail.com wrote:
> Guys and Gals, if there is anyone out there that can help me out a bit,
> i would so appreciate it. I have the source, i have the binary
> datafiles, but i don't have copybooks, please, please help.
I suspect that the problem is that you don't know what a 'copybook' is
or should be.
A 'copybook' is simply a text file that contains a fragment of source
code. Any program that needs to use that code simply has to put '
COPY filename.' into the program source and it is copied in at that
point. In modern copilers (last quarter century) this can be done
almost anywhere for any code. In ancient compilers it was limited as
to what may be COPYed.
Typically copybooks are used where the same code is used in several
programs, such as file record layouts which are commonly accessed.
This means that if a file is changed it is usually only necessary to
change the code once and then recompile all that use it.
If your programs are coded as:
FD somefile.
COPY somerecord
then you already have the necessary copybooks, 'somerecord' is one of
them.
If your programs are written as:
FD somefile.
01 somerecord.
03 somekey ...
...
Then is is only necessary to edit the souce to make the record layout
(everything until the next FD or end of section) to a separate file and
replace it with COPY filename so that it is copied back by the
compiler.
If you have neither of these. ie the programs have COPY file but there
is nothing that relates to 'file' then you are screwed. The programs
won't recompile and you will never know how the files are layed out.
If you think that this is the case yet the programs do compile OK then
you just haven't found where the copybooks are. There may be a
compiler option to specify that the copybooks may be found in a
different directory, or may be in a 'library', or may have a file
extension added by the compiler. So ' COPYmsrec.' or ' COPY
"msrec".' may in fact be reading 'include/msrec.cpy'.
| |
| James J. Gavan 2006-08-25, 6:55 pm |
| Starkey2600@gmail.com wrote:
> Guys and Gals, if there is anyone out there that can help me out a bit,
> i would so appreciate it. I have the source, i have the binary
> datafiles, but i don't have copybooks, please, please help.
> Starkey2600@gmail.com wrote:
>
>
>
I haven't been following this thread, but you are in BIG TROUBLE - you
need those copybooks. New to COBOL, and so that you are quite clear, if
copybooks have been used then the deceased programmer's programs should
look somewhat similar to the the following example.
Copybook1.
*>------------------------------------------
FILE-CONTROL.
Select Customer-File
assign ws-Customer-Filename (or hard coded)
organization indexed
access dynamic
record key Cus-PrimeKey
file status ws-FileStatus.
*>-----------------------------------------------
Copybook2.
*>--------------------------------------------
01 CUS-Record.
05 Cus-PrimeKey pic x(06).
05 Cus-Details.
10 Cus-Name pic x(40).
10 Cus-AddressLine1 pic x(30).
10 Cus-AddressLine2 pic x(30).
10 Cus-City pic
10 Cus-State pic
10 Cus-Zipcode pic
05 Cus-LastTransactionDate pic 9(08). *> ccyymmdd
05 Cus-CurrentBalance pic s9(06)v9(02) comp-3.
*>-------------------------------------------------------------
Depending upon your compiler you should see :-
FILE-CONTROL.
copy "copybook1.cpy".
FD.
copy "copybook2.cpy".
------------------------------------------------------------------------
1. DATA CONVERTERS :
Now first port 'o call. There used to be a couple of COBOLers here who
advertised data file conversions. So firstly check Bill Klein's COBOL
FAQ to see if he references the topic. If not Bill maybe able to recall
who they were. Obviously it will cost you, but if it works, will save a
lot of aggravation.
2. SHERLOCK HOLMES.
#1 is unsuccessful SO you have to go at it 'brute force and ignorance' -
change that to 'brute force and accumulated intelligence' :-).
You have the source - you don't know how lucky you are ! Most folks in
your situation have neither copybooks nor source. Take a look at any
programs that print reports or display screen information, or even
update files - you should see fields being moved prior to
printing/displaying.
so if you see : MOVE CUS-CurrentBalance TO WS-BALANCE and in Working
storage you see :-
01 ws-BALANCE -9,999,999.99
- this gives you an indicator that CUS-CurrentBalnace fits into nine
characters - but that doesn't mean it is 'nine' but the 'signed eight
characters' I show above. Nor is it telling you that the field is
comp-3. Unlikely, rather than packing he (the deceased), could have
specified the field as :-
05 Cus-CurrentBalance pic s9(06)v9(02).
which allows for -999,999.99. (one penny shy of a million)
Are you already ?
Given that you have a tool that can display files in 'raw format', where
any fields which are packed/binary will show up as Egyptian
hieroglyphics, take consolation in the fact that alphabetics pic x(???)
will be readable - you may be able to figure where the 'numerics' are
but not exactly their formats.
Above is arduous to say the least and is still hit and miss to find any
quirks.
3. BIG BANG APPROACH :
Nothing else works BUT you must have the info from the files. Print out
EVERY report to get the latest information plus monetary control totals.
Get ready for it - now write fresh programs where you input the printed
data into file records designed by yourself.
#3 doesn't look the least bit enticing does it ? Sometimes it has to be
that way. Prior to getting into Systems Analysis back in '63 I worked
for a UK dairy company where three companies were merged locating
Accounts Receivable in one location. Thank God I wasn't involved - and
I'm talking a MANUAL Sales Ledger. The merge of the three A/Rs was a
complete cock-up and we were owed £32 million. Lots of wacky suggestions
as to how to overcome the problem. The trouble-shooter put in charge of
the problem noted them all, and with a grim look on his face said, "We
will strike fresh balances for each customer starting at '63 June 01.
Meanwhile a team of six will concentrate on the backlog owed to us
working their way forward". Took about six months but the £32 million
was whittled down to less than £0.5 million.
++++ Go googling and keep plugging away at tools that will convert files
for you, if available - when asking don't confuse with the term 'DB'
(makes people think of SQL, (R)DBMS), tell them they are COBOL files
ISAM, Relative, Sequential or Line Sequential, as appropriate.
Jimmy
| |
| James J. Gavan 2006-08-25, 6:55 pm |
| Starkey2600@gmail.com wrote:
> Guys and Gals, if there is anyone out there that can help me out a bit,
> i would so appreciate it. I have the source, i have the binary
> datafiles, but i don't have copybooks, please, please help.
> Starkey2600@gmail.com wrote:
>
Just a thought. I don't think you told us - which compiler and Version #
are you using ?
Jimmy
| |
| Alistair 2006-08-26, 7:55 am |
| James - stop giving advice. The more advice you give then the less
chance I have of holidaying in the US!
I think that Starkey means that he does not have the copybook FDs and
that he has failed to identidy inline code corresponding to the file
layouts. As he is new-ish to Cobol it is likely that he will be
somewhat daunted by a raw file in hex-mode which you and I would
consider trivial. He may also have other possible problems to face -
some systems use files where spaces and zeros are compressed.
I think, faced with these problems, that he should ask his superiors to
provide him with the support that he clearly needs (thereby denying me
an autumnal holiday).
SHYLOCK HOLMES
James J. Gavan wrote:
> Starkey2600@gmail.com wrote:
> I haven't been following this thread, but you are in BIG TROUBLE - you
> need those copybooks. New to COBOL, and so that you are quite clear, if
> copybooks have been used then the deceased programmer's programs should
> look somewhat similar to the the following example.
>
> Copybook1.
> *>------------------------------------------
> FILE-CONTROL.
>
> Select Customer-File
> assign ws-Customer-Filename (or hard coded)
> organization indexed
> access dynamic
> record key Cus-PrimeKey
> file status ws-FileStatus.
> *>-----------------------------------------------
>
>
> Copybook2.
> *>--------------------------------------------
> 01 CUS-Record.
> 05 Cus-PrimeKey pic x(06).
> 05 Cus-Details.
> 10 Cus-Name pic x(40).
> 10 Cus-AddressLine1 pic x(30).
> 10 Cus-AddressLine2 pic x(30).
> 10 Cus-City pic
> 10 Cus-State pic
> 10 Cus-Zipcode pic
> 05 Cus-LastTransactionDate pic 9(08). *> ccyymmdd
> 05 Cus-CurrentBalance pic s9(06)v9(02) comp-3.
>
> *>-------------------------------------------------------------
>
> Depending upon your compiler you should see :-
>
> FILE-CONTROL.
>
> copy "copybook1.cpy".
>
> FD.
>
> copy "copybook2.cpy".
>
> ------------------------------------------------------------------------
>
> 1. DATA CONVERTERS :
>
> Now first port 'o call. There used to be a couple of COBOLers here who
> advertised data file conversions. So firstly check Bill Klein's COBOL
> FAQ to see if he references the topic. If not Bill maybe able to recall
> who they were. Obviously it will cost you, but if it works, will save a
> lot of aggravation.
>
> 2. SHERLOCK HOLMES.
>
> #1 is unsuccessful SO you have to go at it 'brute force and ignorance' -
> change that to 'brute force and accumulated intelligence' :-).
>
> You have the source - you don't know how lucky you are ! Most folks in
> your situation have neither copybooks nor source. Take a look at any
> programs that print reports or display screen information, or even
> update files - you should see fields being moved prior to
> printing/displaying.
>
> so if you see : MOVE CUS-CurrentBalance TO WS-BALANCE and in Working
> storage you see :-
>
> 01 ws-BALANCE -9,999,999.99
>
> - this gives you an indicator that CUS-CurrentBalnace fits into nine
> characters - but that doesn't mean it is 'nine' but the 'signed eight
> characters' I show above. Nor is it telling you that the field is
> comp-3. Unlikely, rather than packing he (the deceased), could have
> specified the field as :-
>
> 05 Cus-CurrentBalance pic s9(06)v9(02).
>
> which allows for -999,999.99. (one penny shy of a million)
>
> Are you already ?
>
> Given that you have a tool that can display files in 'raw format', where
> any fields which are packed/binary will show up as Egyptian
> hieroglyphics, take consolation in the fact that alphabetics pic x(???)
> will be readable - you may be able to figure where the 'numerics' are
> but not exactly their formats.
>
> Above is arduous to say the least and is still hit and miss to find any
> quirks.
>
> 3. BIG BANG APPROACH :
>
> Nothing else works BUT you must have the info from the files. Print out
> EVERY report to get the latest information plus monetary control totals.
> Get ready for it - now write fresh programs where you input the printed
> data into file records designed by yourself.
>
> #3 doesn't look the least bit enticing does it ? Sometimes it has to be
> that way. Prior to getting into Systems Analysis back in '63 I worked
> for a UK dairy company where three companies were merged locating
> Accounts Receivable in one location. Thank God I wasn't involved - and
> I'm talking a MANUAL Sales Ledger. The merge of the three A/Rs was a
> complete cock-up and we were owed =A332 million. Lots of wacky suggestions
> as to how to overcome the problem. The trouble-shooter put in charge of
> the problem noted them all, and with a grim look on his face said, "We
> will strike fresh balances for each customer starting at '63 June 01.
> Meanwhile a team of six will concentrate on the backlog owed to us
> working their way forward". Took about six months but the =A332 million
> was whittled down to less than =A30.5 million.
>
> ++++ Go googling and keep plugging away at tools that will convert files
> for you, if available - when asking don't confuse with the term 'DB'
> (makes people think of SQL, (R)DBMS), tell them they are COBOL files
> ISAM, Relative, Sequential or Line Sequential, as appropriate.
>=20
> Jimmy
| |
| James J. Gavan 2006-08-26, 6:55 pm |
| Alistair wrote:
> James - stop giving advice. The more advice you give then the less
> chance I have of holidaying in the US!
>
> I think that Starkey means that he does not have the copybook FDs and
> that he has failed to identidy inline code corresponding to the file
> layouts. As he is new-ish to Cobol it is likely that he will be
> somewhat daunted by a raw file in hex-mode which you and I would
> consider trivial. He may also have other possible problems to face -
> some systems use files where spaces and zeros are compressed.
>
> I think, faced with these problems, that he should ask his superiors to
> provide him with the support that he clearly needs (thereby denying me
> an autumnal holiday).
>
> SHYLOCK HOLMES
Alistair (or 'Alligator' as my old spellchecker used to prefer),
I would nae want to stop a thrifty Scot the chance of gayin' to the
States on a holiday, expenses paid. As to the point that his boss should
provide help - seems like his boss wears the boss's hat, but probably
hasn't got a bloody clue; he's just sat there grandly saying, "Now fix
this. It shouldn't take you too long".
I had a subsequent thought as to which compiler he maybe using - should
it possibly be MicroSOFT (the re-badged versions) or Micro FOCUS - then
there's just a chance I could suggest a 'more refined Sherlock Holmes'
approach using Net Express, (The UE Edition for about $100).
Hae' a wee dram next time you meet your boozing friend on that other topic.
Jimmy
| |
| Alistair 2006-08-27, 6:55 pm |
|
James J. Gavan wrote:
> Alistair wrote:
>
> Alistair (or 'Alligator' as my old spellchecker used to prefer),
>
> I would nae want to stop a thrifty Scot the chance of gayin' to the
> States on a holiday, expenses paid. As to the point that his boss should
> provide help - seems like his boss wears the boss's hat, but probably
> hasn't got a bloody clue; he's just sat there grandly saying, "Now fix
> this. It shouldn't take you too long".
>
> I had a subsequent thought as to which compiler he maybe using - should
> it possibly be MicroSOFT (the re-badged versions) or Micro FOCUS - then
> there's just a chance I could suggest a 'more refined Sherlock Holmes'
> approach using Net Express, (The UE Edition for about $100).
>
> Hae' a wee dram next time you meet your boozing friend on that other topic.
>
>
> Jimmy
IIRC, cob2csv was written in MF Cobol.
Ah dinnae partake in the water of life at the moment (cash-poor). My
boozy friend swears that he should have the answer sometime next w
to his problem and thanks all respondents for their input.
Alligator Maculae
(as my word processor spell checker calls me)
| |
| Alistair 2006-08-28, 7:55 am |
|
Starkey2600@gmail.com wrote:
> I've just been hired at a new company, and with this new job comes a
> new database system for me to update. They now have a custom built
> COBOL software running their db, as I'm not the slightest bit
> accustomed to COBOL, having only been born in 83 :).
>
If you are still having trouble with cbl2csv then look at the following
site:
http://www.simotime.com/cblcsv01.htm
Their convertor is well documented and may represent a good
alternative. However, they do expect to be paid (see the licence
agreement).
| |
| Starkey2600@gmail.com 2006-08-30, 6:55 pm |
| James, thanks a great deal for your wise words of wisdom. It is
definitely overwhelming, but obviously the only set of ways to get this
accomplished. I've decided that i'm only going to spend a couple more
w s working on retrieving the data, and then I'm going to let my boss
know that he will have to either buy software or hire someone to do it.
But before i give up let me give you a sample of what i'm working
with.
Okay, yes i have the source and i'm quite thankful for that, but i'm
not sure what to do with it ;( This software is made up for lots of
program files and subprograms. The following is the top of the source
file for this particular program. Not all of the files have the same
info in this section, but they all have this type of section with this
type of information.
Here it is
000010 IDENTIFICATION DIVISION.
000040 PROGRAM-ID. PRD020SR.
000070*
000100* THIS PROGRAM DOES ADDS CHANGES INQUIRYS DELETES OR
000130* PRINTS THE
000160* RAW MATERIAL INVENTORY
000190*
000220 AUTHOR. SPLIT DECISIONS.
000250 DATE-WRITTEN. 840625.
000280 ENVIRONMENT DIVISION.
000310 CONFIGURATION SECTION.
000340 SOURCE-COMPUTER. RMC.
000370 OBJECT-COMPUTER. RMC.
000400 INPUT-OUTPUT SECTION.
000430 FILE-CONTROL.
000460 SELECT MASTER ASSIGN TO RANDOM,
000520** "RAWINVTY"
000490 "/usr/jlw/datafiles/RAWINVTY"
000550 ORGANIZATION IS INDEXED,
000580 ACCESS IS DYNAMIC,
000610 RECORD KEY IS MAST-KEY1,
000640 ALTERNATE RECORD KEY IS FIELD-02 WITH DUPLICATES
000670 FILE STATUS IS FS.
000700 SELECT PRINTFL ASSIGN TO PRINT, "PRINTER".
000730 DATA DIVISION.
000760 FILE SECTION.
000790 FD MASTER,
000820 RECORD CONTAINS 127 CHARACTERS,
000850 BLOCK CONTAINS 002 RECORDS,
000880 LABEL RECORDS ARE STANDARD,
000910*
000940 DATA RECORD IS MAST-RECD.
000970 01 MAST-RECD.
001000* ITEM NUMBER
001030 05 FIELD-01 PIC 9(010).
001060 05 FIELD-1A PIC XX.
001090* DESCRIPTION
001120 05 FIELD-02 PIC X(024).
001150* QUANTITY ON HAND
001180 05 FIELD-03 PIC S9(009)V9999, COMP-3.
001210* QUANTITY ON ORDER
001240 05 FIELD-04 PIC S9(009)V9999, COMP-3.
001270* WIDTH
001300 05 FIELD-05 PIC S9(003)V9999.
001330* LENGTH
001360 05 FIELD-06 PIC S9(003)V9999.
001390* POUNDS PER FOOT
001420 05 FIELD-07 PIC S9(003)V9999.
001450* COST PER POUND
001480 05 FIELD-08 PIC S9(003)V9999.
001510* LOCATION
001540 05 FIELD-09 PIC X(010).
001570* RETAIL PER FOOT
001600 05 FIELD-10 PIC S9(003)V9999.
001510* PRICE CODE (P=3DPRICE PER POUND F =3D PRICE PER FOOT)
001540 05 FIELD-11 PIC X(001).
001630 05 FILLER PIC X(026).
001660 01 KEY-FIELD1.
001690 05 MAST-KEY1 PIC X(012).
001720 05 REDF-KEY1 REDEFINES MAST-KEY1 PIC X(012).
001750 05 FILLER PIC X(115).
001780 FD PRINTFL LABEL RECORDS ARE OMITTED.
001810 01 FULL-PRINT PIC X(132).
001840 01 PRINT1.
001870 05 FILLER PIC X(001).
001900 05 PRTFLD01 PIC X(010).
001930 05 FILLER PIC X(003).
001960 05 PRTFLD1A PIC XX.
001990 05 FILLER PIC X(003).
002020 05 PRTFLD02 PIC X(024).
002050 05 FILLER PIC X(005).
002080 05 PRTFLD09 PIC X(016).
002110 05 PRTFLD03 PIC X(015).
002140 05 PRTFLD04 PIC X(015).
002170 05 FILLER PIC X(040).
002200 01 PRINT2.
002230 05 FILLER PIC X(016).
002380 05 PRTFLD11 PIC X(010).
002410 05 FILLER PIC X(002).
002260 05 PRTFLD05 PIC X(015).
002290 05 FILLER PIC X(002).
002320 05 PRTFLD06 PIC X(010).
002350 05 FILLER PIC X(002).
002380 05 PRTFLD07 PIC X(010).
002410 05 FILLER PIC X(002).
002440 05 PRTFLD08 PIC X(010).
002470 05 FILLER PIC X(002).
002500 05 PRTFLD10 PIC X(016).
002530 05 FILLER PIC X(002).
002560 05 PRTFLD9A PIC X(015).
002590 05 PRTFLD12 PIC X(014).
002620 WORKING-STORAGE SECTION.
002650 77 FS PIC XX VALUE ZEROS.
002680 77 ACTION PIC 9 VALUE ZEROS.
002710 77 PAUSE PIC X.
002740 77 ACCESS-KEY PIC X VALUE SPACES.
002770 77 END-FIELD PIC X(24) VALUE SPACES.
002800 77 NINES PIC X(20) VALUE "99999999999999999999".
002830 77 HEAD-SW PIC X VALUE ZEROS.
002860 77 LINECNT PIC 999 VALUE ZEROS.
002890 77 CURSOR-MESG PIC 99999 VALUE 20001.
002920 77 ERROR-SW PIC X VALUE ZEROS.
002950 77 LOOP-CTR PIC 9999 VALUE ZEROS.
002980 77 WORK-LINE PIC 99 VALUE ZEROS.
003010 77 SPACE-LINE PIC X(77) VALUE SPACES.
003040 77 ASTER PIC X VALUE "*".
003070 77 CHAR PIC X VALUE SPACES.
003100 77 INSPCT PIC X(40) VALUE SPACES.
003130 77 DISPF PIC X(10) VALUE SPACES.
003160 77 NINE PIC X VALUE "9".
003190 77 ANSWER PIC X VALUE ZEROS.
003220 77 PRT-ASWR PIC X VALUE SPACE.
003220 77 CONT-ANSW PIC X VALUE SPACE.
003250 77 RUN-TYPE PIC X(10) VALUE ZEROS.
003310 77 SCREEN-SPACING PIC 9(001) VALUE 0.
003340 77 SCREEN-TYPE PIC X(001) VALUE " ".
003370 77 HD-ASTER PIC X(132) VALUE ALL "=3D".
003400 77 TOT-RAW-INV PIC S9(9)V9999 VALUE ZEROS.
003401 77 HLD-1A PIC XX VALUE SPACES.
003402 77 HLD-FIELD01 PIC 9(8) VALUE ZEROS.
003402 77 PSWD PIC X(04) VALUE SPACES.
003402 01 MAST-KEY-END PIC X(10) VALUE ZEROS.
003402 01 END-KEY REDEFINES MAST-KEY-END.
003402 05 END-ITEM PIC 9(08).
003402 05 END-SUFFIX PIC 9(02).
003430 01 TOTALS.
003460 05 TOT-ON-HD PIC S9(9)V9999.
003490 05 TOTONHD PIC Z(9).9999-.
003520 05 TOT-FEET PIC S9(9)V9999.
003550 05 TOT-LBS PIC S9(9)V9999.
003580 05 TOT-COST PIC S9(9)V9999.
003610 05 TOTCOST PIC Z(9).9999-.
003640 01 MASTER-HEAD.
003670 02 FILLER PIC X.
003700 02 FILLER PIC X(23) VALUE "FILE MAINTENANCE FOR - ".
003730 02 MAST-HED2 PIC X(30) VALUE "RAW MATERIAL INVENTORY".
003760 01 HEADING-DATA.
003790 05 HEADF-01 PIC X(011), VALUE "ITEM NUMBER".
003820 05 ABVHED01 PIC X(005), VALUE "ITEM#".
003850 05 HEADF-1A PIC X(006) VALUE "SUFFIX".
003880 05 ABVHED1A PIC XX VALUE "SF".
003910 05 HEADF-02 PIC X(020), VALUE
003940 " DESCRIPTION ".
003970 05 ABVHED02 PIC X(005), VALUE "DESC.".
004000 05 HEADF-03 PIC X(016), VALUE "QUANTITY ON HAND".
004030 05 ABVHED03 PIC X(013), VALUE " QTY-ON-HAND ".
004060 05 HEADF-04 PIC X(017), VALUE "QUANTITY ON ORDER".
004090 05 ABVHED04 PIC X(013), VALUE "QTY-ON-ORDER".
004120 05 HEADF-05 PIC X(007), VALUE
004150 " WIDTH ".
004180 05 ABVHED05 PIC X(007), VALUE "WIDTH".
004210 05 HEADF-06 PIC X(007), VALUE "LENGTH".
004240 05 ABVHED06 PIC X(007), VALUE "LENGTH".
004270 05 HEADF-07 PIC X(015), VALUE
004300 "POUNDS PER FOOT".
004330 05 ABVHED07 PIC X(015), VALUE
004360 "POUNDS PER FOOT".
004390 05 HEADF-08 PIC X(015), VALUE
004420 "COST PER POUND".
004450 05 ABVHED08 PIC X(015), VALUE
004480 "COST PER POUND".
004270 05 HEADF-A7 PIC X(015), VALUE
004300 "PRICE PER FOOT".
004390 05 HEADF-A8 PIC X(015), VALUE
004420 "COST PER FOOT ".
004510 05 HEADF-09 PIC X(008), VALUE "LOCATION".
004540 05 ABVHED09 PIC X(008), VALUE "LOCATION".
004570 05 HEADF-10 PIC X(016), VALUE
004600 "RETAIL PER POUND".
004630 05 ABVHED10 PIC X(016), VALUE
004660 "RETAIL PER POUND".
004570 05 HEADF-A10 PIC X(016), VALUE
004600 "RETAIL PER FOOT ".
004510 05 HEADF-11 PIC X(008), VALUE "PR-CODE ".
004540 05 ABVHED11 PIC X(008), VALUE "PR-CODE ".
004690 01 DASH-DATA.
004720 05 DASHF-01 PIC X(010), VALUE "----------".
004750 05 DASHF-1A PIC X(002), VALUE "--".
004780 05 DASHF-02 PIC X(024), VALUE
004810 "------------------------".
004840 05 DASHF-03 PIC X(013), VALUE "-------------".
004870 05 DASHF-04 PIC X(013), VALUE "-------------".
004900 05 DASHF-05 PIC X(008), VALUE
004930 "--------".
004960 05 DASHF-06 PIC X(008), VALUE "--------".
004990 05 DASHF-07 PIC X(008), VALUE "--------".
005020 05 DASHF-08 PIC X(008), VALUE "--------".
005050 05 DASHF-09 PIC X(010), VALUE "----------".
005080 05 DASHF-10 PIC X(008), VALUE "--------".
004750 05 DASHF-11 PIC X(001), VALUE "P".
005140 01 CURSOR01 PIC 9(005), VALUE 04003.
005170* ITEM NUMBER
005200 01 INPUT-01 PIC 9(010).
005230 01 OUTPUT01 REDEFINES INPUT-01 PIC 9(010).
005260 01 TESTTP01 REDEFINES INPUT-01 PIC X(010).
005290 01 CURSOR1A PIC 9(005), VALUE 04015.
005320 01 INPUT-1A PIC X(002).
005350 01 OUTPUT1A REDEFINES INPUT-1A PIC XX.
005380 01 TESTTP1A REDEFINES INPUT-1A PIC XX.
005410 01 CURSOR02 PIC 9(005), VALUE 04025.
005440* DESCRIPTION
005470 01 INPUT-02 PIC X(024).
005500 01 OUTPUT02 REDEFINES INPUT-02 PIC X(024).
005530 01 TESTTP02 REDEFINES INPUT-02 PIC X(024).
005560 01 CURSOR03 PIC 9(005), VALUE 10002.
005590* QUANTITY ON HAND
005620 01 INPUT-03 PIC S9(010)V9999.
005650 01 OUTPUT03 REDEFINES INPUT-03 PIC Z(009).9999-.
005680 01 TESTTP03 REDEFINES INPUT-03 PIC X(015).
005710 01 CURSOR04 PIC 9(005), VALUE 10020.
005740* QUANTITY ON ORDER
005770 01 INPUT-04 PIC S9(010)V9999.
005800 01 OUTPUT04 REDEFINES INPUT-04 PIC Z(009).9999-.
005830 01 TESTTP04 REDEFINES INPUT-04 PIC X(015).
005860 01 CURSOR05 PIC 9(005), VALUE 14003.
005890** WIDTH
005920 01 INPUT-05 PIC S9(003)V9999.
005950 01 OUTPUT05 REDEFINES INPUT-05 PIC Z(002).9999-.
005980 01 TESTTP05 REDEFINES INPUT-05 PIC X(008).
006010 01 CURSOR06 PIC 9(005), VALUE 14021.
006040** HEIGHT
006070 01 INPUT-06 PIC S9(003)V9999.
006100 01 OUTPUT06 REDEFINES INPUT-06 PIC Z(002).9999-.
006130 01 TESTTP06 REDEFINES INPUT-06 PIC X(008).
006160 01 CURSOR07 PIC 9(005), VALUE 18002.
006190** POUNDS PER FOOT
006220 01 INPUT-07 PIC S9(004)V9999.
006250 01 OUTPUT07 REDEFINES INPUT-07 PIC Z(003).9999-.
006280 01 TESTTP07 REDEFINES INPUT-07 PIC X(009).
006310 01 CURSOR08 PIC 9(005), VALUE 18025.
006340** COST PER POUND
006370 01 INPUT-08 PIC S9(004)V9999.
006400 01 OUTPUT08 REDEFINES INPUT-08 PIC Z(003).9999-.
006430 01 TESTTP08 REDEFINES INPUT-08 PIC X(009).
006460 01 CURSOR09 PIC 9(005), VALUE 14065.
006490** FILLER-5
006520 01 INPUT-09 PIC X(015).
006550 01 OUTPUT09 REDEFINES INPUT-09 PIC X(015).
006580 01 TESTTP09 REDEFINES INPUT-09 PIC X(015).
006610 01 CURSOR10 PIC 9(005), VALUE 18045.
006640 01 INPUT-10 PIC S9(004)V9999.
006670 01 OUTPUT10 REDEFINES INPUT-10 PIC Z(003).9999-.
006700 01 TESTTP10 REDEFINES INPUT-10 PIC X(009).
005290 01 CURSOR11 PIC 9(005), VALUE 04055.
005320 01 INPUT-11 PIC X(001).
005350 01 OUTPUT11 REDEFINES INPUT-11 PIC X.
005380 01 TESTTP11 REDEFINES INPUT-11 PIC X.
006730 01 CC-LC.
006760 05 CC-LINE PIC 99.
006790 05 CC-COL PIC 999.
006820 01 REDF-CCL REDEFINES CC-LC.
006850 02 L PIC 99.
006880 02 P PIC 999.
006910 01 PRINTER-HEAD.
006940 02 FILLER PIC X(06) VALUE " DATE".
006970 02 PRT-DATE PIC X(20) VALUE SPACES.
007000 02 FILLER PIC X(30) VALUE "RECORD PRINT FOR FILE -".
007030 02 PRT-NAME PIC X(30) VALUE SPACES.
007060 02 FILLER PIC X(10) VALUE " PAGE ".
007090 02 PG-CTR PIC 999 VALUE ZEROS.
007120 02 FILLER PIC X(5) VALUE SPACES.
007150 02 PRT-TIME PIC 9(8) VALUE ZEROS.
007180 01 CPU-DATE.
007210 02 CPU-YR PIC 99.
007240 02 CPU-MO PIC 99.
007270 02 CPU-DA PIC 99.
007300 01 REFORMATT-DATE.
007330 02 RFD-MO PIC 99.
007360 02 FILLER PIC X VALUE "/".
007390 02 RFD-DA PIC 99.
007420 02 FILLER PIC X VALUE "/".
007450 02 RFD-YR PIC 99.
007451 01 DUP-RECD.
007452 05 DUP-SW PIC X VALUE SPACE.
007453 05 DUP-DESC PIC X(24) VALUE SPACES.
007454 05 DUP-PDS PIC S9(3)V999 VALUE ZEROS.
007455 05 DUP-CST PIC S9(3)V999 VALUE ZEROS.
007456 05 DUP-RET PIC S9(3)V999 VALUE ZEROS.
007452 05 DUP-PRC PIC X VALUE SPACE.
007456**
007456 01 SCR-LINE PIC X(80) VALUE SPACES.
001840 01 SCR-LINE1.
001870 05 FILLER PIC X(001).
001900 05 SCRFLD01 PIC X(010).
001930 05 FILLER PIC X(003).
001960 05 SCRFLD1A PIC XX.
001990 05 FILLER PIC X(003).
002020 05 SCRFLD02 PIC X(024).
002050 05 FILLER PIC X(005).
002080 05 SCRFLD09 PIC X(016).
002110 05 SCRFLD03 PIC X(015).
002200 01 SCR-LINE2.
002230 05 FILLER PIC X(001).
002260 05 SCRFLD05 PIC X(015).
002290 05 FILLER PIC X(002).
002320 05 SCRFLD06 PIC X(010).
002350 05 FILLER PIC X(002).
002380 05 SCRFLD07 PIC X(010).
002410 05 FILLER PIC X(002).
002440 05 SCRFLD08 PIC X(010).
002470 05 FILLER PIC X(002).
002500 05 SCRFLD10 PIC X(016).
002200 01 SCR-LINE3.
002530 05 FILLER PIC X(002).
002560 05 SCRFLD9A PIC X(015).
002590 05 SCRFLD11 PIC X(014).
Now i'm pretty sure that the information here is the copybook
info....right? So do i copy this info out put it in a new file? If so
does the tabbing and spacing matter for copybook files?
Thanks again for the help
James J. Gavan wrote:
> Starkey2600@gmail.com wrote:
> I haven't been following this thread, but you are in BIG TROUBLE - you
> need those copybooks. New to COBOL, and so that you are quite clear, if
> copybooks have been used then the deceased programmer's programs should
> look somewhat similar to the the following example.
>
> Copybook1.
> *>------------------------------------------
> FILE-CONTROL.
>
> Select Customer-File
> assign ws-Customer-Filename (or hard coded)
> organization indexed
> access dynamic
> record key Cus-PrimeKey
> file status ws-FileStatus.
> *>-----------------------------------------------
>
>
> Copybook2.
> *>--------------------------------------------
> 01 CUS-Record.
> 05 Cus-PrimeKey pic x(06).
> 05 Cus-Details.
> 10 Cus-Name pic x(40).
> 10 Cus-AddressLine1 pic x(30).
> 10 Cus-AddressLine2 pic x(30).
> 10 Cus-City pic
> 10 Cus-State pic
> 10 Cus-Zipcode pic
> 05 Cus-LastTransactionDate pic 9(08). *> ccyymmdd
> 05 Cus-CurrentBalance pic s9(06)v9(02) comp-3.
>
> *>-------------------------------------------------------------
>
> Depending upon your compiler you should see :-
>
> FILE-CONTROL.
>
> copy "copybook1.cpy".
>
> FD.
>
> copy "copybook2.cpy".
>
> ------------------------------------------------------------------------
>
> 1. DATA CONVERTERS :
>
> Now first port 'o call. There used to be a couple of COBOLers here who
> advertised data file conversions. So firstly check Bill Klein's COBOL
> FAQ to see if he references the topic. If not Bill maybe able to recall
> who they were. Obviously it will cost you, but if it works, will save a
> lot of aggravation.
>
> 2. SHERLOCK HOLMES.
>
> #1 is unsuccessful SO you have to go at it 'brute force and ignorance' -
> change that to 'brute force and accumulated intelligence' :-).
>
> You have the source - you don't know how lucky you are ! Most folks in
> your situation have neither copybooks nor source. Take a look at any
> programs that print reports or display screen information, or even
> update files - you should see fields being moved prior to
> printing/displaying.
>
> so if you see : MOVE CUS-CurrentBalance TO WS-BALANCE and in Working
> storage you see :-
>
> 01 ws-BALANCE -9,999,999.99
>
> - this gives you an indicator that CUS-CurrentBalnace fits into nine
> characters - but that doesn't mean it is 'nine' but the 'signed eight
> characters' I show above. Nor is it telling you that the field is
> comp-3. Unlikely, rather than packing he (the deceased), could have
> specified the field as :-
>
> 05 Cus-CurrentBalance pic s9(06)v9(02).
>
> which allows for -999,999.99. (one penny shy of a million)
>
> Are you already ?
>
> Given that you have a tool that can display files in 'raw format', where
> any fields which are packed/binary will show up as Egyptian
> hieroglyphics, take consolation in the fact that alphabetics pic x(???)
> will be readable - you may be able to figure where the 'numerics' are
> but not exactly their formats.
>
> Above is arduous to say the least and is still hit and miss to find any
> quirks.
>
> 3. BIG BANG APPROACH :
>
> Nothing else works BUT you must have the info from the files. Print out
> EVERY report to get the latest information plus monetary control totals.
> Get ready for it - now write fresh programs where you input the printed
> data into file records designed by yourself.
>
> #3 doesn't look the least bit enticing does it ? Sometimes it has to be
> that way. Prior to getting into Systems Analysis back in '63 I worked
> for a UK dairy company where three companies were merged locating
> Accounts Receivable in one location. Thank God I wasn't involved - and
> I'm talking a MANUAL Sales Ledger. The merge of the three A/Rs was a
> complete cock-up and we were owed =A332 million. Lots of wacky suggestions
> as to how to overcome the problem. The trouble-shooter put in charge of
> the problem noted them all, and with a grim look on his face said, "We
> will strike fresh balances for each customer starting at '63 June 01.
> Meanwhile a team of six will concentrate on the backlog owed to us
> working their way forward". Took about six months but the =A332 million
> was whittled down to less than =A30.5 million.
>
> ++++ Go googling and keep plugging away at tools that will convert files
> for you, if available - when asking don't confuse with the term 'DB'
> (makes people think of SQL, (R)DBMS), tell them they are COBOL files
> ISAM, Relative, Sequential or Line Sequential, as appropriate.
>=20
> Jimmy
| |
| James J. Gavan 2006-08-30, 6:55 pm |
| Starkey2600@gmail.com wrote:
1. You still didn't tell us which compiler you are using, but from
your entries :-
> 000340 SOURCE-COMPUTER. RMC.
> 000370 OBJECT-COMPUTER. RMC.
> 000250 DATE-WRITTEN. 840625.
you are using RM/COBOL.
From your 'Date Written' your compiler Version # must be prior to
RM/COBOL 85. Which version # is it - it should show up if you attempt to
compile a program. If it is Version #2 or prior, RM (Liant) no longer
offer any technical support.
2. As to 'copybooks' - if your other programs look like what you have
shown us - you don't need them ! The example information I showed in
copybook1 and copybook2 is covered in your existing entries :-
> 000430 FILE-CONTROL.
> 000460 SELECT MASTER ASSIGN TO RANDOM,
> 000520** "RAWINVTY"
> 000490 "/usr/jlw/datafiles/RAWINVTY"
> 000550 ORGANIZATION IS INDEXED,
> 000580 ACCESS IS DYNAMIC,
> 000610 RECORD KEY IS MAST-KEY1,
> 000640 ALTERNATE RECORD KEY IS FIELD-02 WITH DUPLICATES
> 000670 FILE STATUS IS FS.
> 000700 SELECT PRINTFL ASSIGN TO PRINT, "PRINTER".
> 000730 DATA DIVISION.
> 000760 FILE SECTION.
> 000790 FD MASTER,
> 000820 RECORD CONTAINS 127 CHARACTERS,
> 000850 BLOCK CONTAINS 002 RECORDS,
> 000880 LABEL RECORDS ARE STANDARD,
> 000910*
> 000940 DATA RECORD IS MAST-RECD.
> 000970 01 MAST-RECD.
> 001000* ITEM NUMBER
> 001030 05 FIELD-01 PIC 9(010).
> 001060 05 FIELD-1A PIC XX.
> 001090* DESCRIPTION
> 001120 05 FIELD-02 PIC X(024).
> 001150* QUANTITY ON HAND
> 001180 05 FIELD-03 PIC S9(009)V9999, COMP-3.
> 001210* QUANTITY ON ORDER
> 001240 05 FIELD-04 PIC S9(009)V9999, COMP-3.
> 001270* WIDTH
> 001300 05 FIELD-05 PIC S9(003)V9999.
> 001330* LENGTH
> 001360 05 FIELD-06 PIC S9(003)V9999.
> 001390* POUNDS PER FOOT
> 001420 05 FIELD-07 PIC S9(003)V9999.
> 001450* COST PER POUND
> 001480 05 FIELD-08 PIC S9(003)V9999.
> 001510* LOCATION
> 001540 05 FIELD-09 PIC X(010).
> 001570* RETAIL PER FOOT
> 001600 05 FIELD-10 PIC S9(003)V9999.
> 001510* PRICE CODE (P=PRICE PER POUND F = PRICE PER FOOT)
> 001540 05 FIELD-11 PIC X(001).
> 001630 05 FILLER PIC X(026).
> 001660 01 KEY-FIELD1.
> 001690 05 MAST-KEY1 PIC X(012).
> 001720 05 REDF-KEY1 REDEFINES MAST-KEY1 PIC X(012).
> 001750 05 FILLER PIC X(115).
> 001780 FD PRINTFL LABEL RECORDS ARE OMITTED.
> 001810 01 FULL-PRINT PIC X(132).
> 001840 01 PRINT1.
> 001870 05 FILLER PIC X(001).
> 001900 05 PRTFLD01 PIC X(010).
> 001930 05 FILLER PIC X(003).
> 001960 05 PRTFLD1A PIC XX.
> 001990 05 FILLER PIC X(003).
> 002020 05 PRTFLD02 PIC X(024).
> 002050 05 FILLER PIC X(005).
> 002080 05 PRTFLD09 PIC X(016).
> 002110 05 PRTFLD03 PIC X(015).
> 002140 05 PRTFLD04 PIC X(015).
> 002170 05 FILLER PIC X(040).
> 002200 01 PRINT2.
> 002230 05 FILLER PIC X(016).
> 002380 05 PRTFLD11 PIC X(010).
> 002410 05 FILLER PIC X(002).
> 002260 05 PRTFLD05 PIC X(015).
> 002290 05 FILLER PIC X(002).
> 002320 05 PRTFLD06 PIC X(010).
> 002350 05 FILLER PIC X(002).
> 002380 05 PRTFLD07 PIC X(010).
> 002410 05 FILLER PIC X(002).
> 002440 05 PRTFLD08 PIC X(010).
> 002470 05 FILLER PIC X(002).
> 002500 05 PRTFLD10 PIC X(016).
> 002530 05 FILLER PIC X(002).
> 002560 05 PRTFLD9A PIC X(015).
> 002590 05 PRTFLD12 PIC X(014).
Now there are two ways you can define files/records - hard code as this
program shows or turn the above into a pair of copybooks. The advantage
of copybooks - having determined the formats above you turn them into
copybooks and the SAME copybooks are used in other programs. Get the
format correct (clean compile) in one program then the same copybooks
will work just fine in other programs.
So using copybooks :-
FILE-CONTROL.
copy "RawInventory1.cpy".
DATA DIVISION.
FILE SECTION.
copy "RawInventory2.cpy".
1. Step # - Take a copy of the original compiled version of this program
- I think you will find it has the extension xxx.COB in RM, and copy
it somewhere safely). Now try and compile this program. Does it compile
cleanly - if not, why not - what sort of errors do you get - not an
exhaustive list - just indicate some of the error types.
2. Presumably the current application works, and if so, why did you
think you needed copybooks ? *IF* you are going to write some new
programs, using the existing files - then that's where the copybooks
come into play.
So apart from what you might want to do in #2 above - do you foresee any
further problems that you want to spell out ?
On a completely different tack - can you indicate the following for us :-
a) Small software house - how many programmers
b) How many programmers actually *proficient* in COBOL
c) Are there others using other languages
d) Do you have a programming background in other languages - which, and
how long
e) How long have you been at COBOL
f) what are you earning for this job
Based on answers to (a) through (f) above, my advice might be, "Put on a
pair of running shoes and run *any* direction from this site as quickly
as you can !". I don't know what your answers are likely to be, but you
could be on a hiding to nothing if you are being stretched beyond your
current experience/competence, or if in fact the installation is one big
bloody mess.
Jimmy
> James, thanks a great deal for your wise words of wisdom. It is
> definitely overwhelming, but obviously the only set of ways to get this
> accomplished. I've decided that i'm only going to spend a couple more
> w s working on retrieving the data, and then I'm going to let my boss
> know that he will have to either buy software or hire someone to do it.
> But before i give up let me give you a sample of what i'm working
> with.
>
> Okay, yes i have the source and i'm quite thankful for that, but i'm
> not sure what to do with it ;( This software is made up for lots of
> program files and subprograms. The following is the top of the source
> file for this particular program. Not all of the files have the same
> info in this section, but they all have this type of section with this
> type of information.
>
> Here it is
> 000010 IDENTIFICATION DIVISION.
> 000040 PROGRAM-ID. PRD020SR.
> 000070*
> 000100* THIS PROGRAM DOES ADDS CHANGES INQUIRYS DELETES OR
> 000130* PRINTS THE
> 000160* RAW MATERIAL INVENTORY
> 000190*
> 000220 AUTHOR. SPLIT DECISIONS.
> 000250 DATE-WRITTEN. 840625.
> 000280 ENVIRONMENT DIVISION.
> 000310 CONFIGURATION SECTION.
> 000340 SOURCE-COMPUTER. RMC.
> 000370 OBJECT-COMPUTER. RMC.
> 000400 INPUT-OUTPUT SECTION.
> 000430 FILE-CONTROL.
> 000460 SELECT MASTER ASSIGN TO RANDOM,
> 000520** "RAWINVTY"
> 000490 "/usr/jlw/datafiles/RAWINVTY"
> 000550 ORGANIZATION IS INDEXED,
> 000580 ACCESS IS DYNAMIC,
> 000610 RECORD KEY IS MAST-KEY1,
> 000640 ALTERNATE RECORD KEY IS FIELD-02 WITH DUPLICATES
> 000670 FILE STATUS IS FS.
> 000700 SELECT PRINTFL ASSIGN TO PRINT, "PRINTER".
> 000730 DATA DIVISION.
> 000760 FILE SECTION.
> 000790 FD MASTER,
> 000820 RECORD CONTAINS 127 CHARACTERS,
> 000850 BLOCK CONTAINS 002 RECORDS,
> 000880 LABEL RECORDS ARE STANDARD,
> 000910*
> 000940 DATA RECORD IS MAST-RECD.
> 000970 01 MAST-RECD.
> 001000* ITEM NUMBER
> 001030 05 FIELD-01 PIC 9(010).
> 001060 05 FIELD-1A PIC XX.
> 001090* DESCRIPTION
> 001120 05 FIELD-02 PIC X(024).
> 001150* QUANTITY ON HAND
> 001180 05 FIELD-03 PIC S9(009)V9999, COMP-3.
> 001210* QUANTITY ON ORDER
> 001240 05 FIELD-04 PIC S9(009)V9999, COMP-3.
> 001270* WIDTH
> 001300 05 FIELD-05 PIC S9(003)V9999.
> 001330* LENGTH
> 001360 05 FIELD-06 PIC S9(003)V9999.
> 001390* POUNDS PER FOOT
> 001420 05 FIELD-07 PIC S9(003)V9999.
> 001450* COST PER POUND
> 001480 05 FIELD-08 PIC S9(003)V9999.
> 001510* LOCATION
> 001540 05 FIELD-09 PIC X(010).
> 001570* RETAIL PER FOOT
> 001600 05 FIELD-10 PIC S9(003)V9999.
> 001510* PRICE CODE (P=PRICE PER POUND F = PRICE PER FOOT)
> 001540 05 FIELD-11 PIC X(001).
> 001630 05 FILLER PIC X(026).
> 001660 01 KEY-FIELD1.
> 001690 05 MAST-KEY1 PIC X(012).
> 001720 05 REDF-KEY1 REDEFINES MAST-KEY1 PIC X(012).
> 001750 05 FILLER PIC X(115).
> 001780 FD PRINTFL LABEL RECORDS ARE OMITTED.
> 001810 01 FULL-PRINT PIC X(132).
> 001840 01 PRINT1.
> 001870 05 FILLER PIC X(001).
> 001900 05 PRTFLD01 PIC X(010).
> 001930 05 FILLER PIC X(003).
> 001960 05 PRTFLD1A PIC XX.
> 001990 05 FILLER PIC X(003).
> 002020 05 PRTFLD02 PIC X(024).
> 002050 05 FILLER PIC X(005).
> 002080 05 PRTFLD09 PIC X(016).
> 002110 05 PRTFLD03 PIC X(015).
> 002140 05 PRTFLD04 PIC X(015).
> 002170 05 FILLER PIC X(040).
> 002200 01 PRINT2.
> 002230 05 FILLER PIC X(016).
> 002380 05 PRTFLD11 PIC X(010).
> 002410 05 FILLER PIC X(002).
> 002260 05 PRTFLD05 PIC X(015).
> 002290 05 FILLER PIC X(002).
> 002320 05 PRTFLD06 PIC X(010).
> 002350 05 FILLER PIC X(002).
> 002380 05 PRTFLD07 PIC X(010).
> 002410 05 FILLER PIC X(002).
> 002440 05 PRTFLD08 PIC X(010).
> 002470 05 FILLER PIC X(002).
> 002500 05 PRTFLD10 PIC X(016).
> 002530 05 FILLER PIC X(002).
> 002560 05 PRTFLD9A PIC X(015).
> 002590 05 PRTFLD12 PIC X(014).
> 002620 WORKING-STORAGE SECTION.
> 002650 77 FS PIC XX VALUE ZEROS.
> 002680 77 ACTION PIC 9 VALUE ZEROS.
> 002710 77 PAUSE PIC X.
> 002740 77 ACCESS-KEY PIC X VALUE SPACES.
> 002770 77 END-FIELD PIC X(24) VALUE SPACES.
> 002800 77 NINES PIC X(20) VALUE "99999999999999999999".
> 002830 77 HEAD-SW PIC X VALUE ZEROS.
> 002860 77 LINECNT PIC 999 VALUE ZEROS.
> 002890 77 CURSOR-MESG PIC 99999 VALUE 20001.
> 002920 77 ERROR-SW PIC X VALUE ZEROS.
> 002950 77 LOOP-CTR PIC 9999 VALUE ZEROS.
> 002980 77 WORK-LINE PIC 99 VALUE ZEROS.
> 003010 77 SPACE-LINE PIC X(77) VALUE SPACES.
> 003040 77 ASTER PIC X VALUE "*".
> 003070 77 CHAR PIC X VALUE SPACES.
> 003100 77 INSPCT PIC X(40) VALUE SPACES.
> 003130 77 DISPF PIC X(10) VALUE SPACES.
> 003160 77 NINE PIC X VALUE "9".
> 003190 77 ANSWER PIC X VALUE ZEROS.
> 003220 77 PRT-ASWR PIC X VALUE SPACE.
> 003220 77 CONT-ANSW PIC X VALUE SPACE.
> 003250 77 RUN-TYPE PIC X(10) VALUE ZEROS.
> 003310 77 SCREEN-SPACING PIC 9(001) VALUE 0.
> 003340 77 SCREEN-TYPE PIC X(001) VALUE " ".
> 003370 77 HD-ASTER PIC X(132) VALUE ALL "=".
> 003400 77 TOT-RAW-INV PIC S9(9)V9999 VALUE ZEROS.
> 003401 77 HLD-1A PIC XX VALUE SPACES.
> 003402 77 HLD-FIELD01 PIC 9(8) VALUE ZEROS.
> 003402 77 PSWD PIC X(04) VALUE SPACES.
> 003402 01 MAST-KEY-END PIC X(10) VALUE ZEROS.
> 003402 01 END-KEY REDEFINES MAST-KEY-END.
> 003402 05 END-ITEM PIC 9(08).
> 003402 05 END-SUFFIX PIC 9(02).
> 003430 01 TOTALS.
> 003460 05 TOT-ON-HD PIC S9(9)V9999.
> 003490 05 TOTONHD PIC Z(9).9999-.
> 003520 05 TOT-FEET PIC S9(9)V9999.
> 003550 05 TOT-LBS PIC S9(9)V9999.
> 003580 05 TOT-COST PIC S9(9)V9999.
> 003610 05 TOTCOST PIC Z(9).9999-.
> 003640 01 MASTER-HEAD.
> 003670 02 FILLER PIC X.
> 003700 02 FILLER PIC X(23) VALUE "FILE MAINTENANCE FOR - ".
>
> 003730 02 MAST-HED2 PIC X(30) VALUE "RAW MATERIAL INVENTORY".
>
> 003760 01 HEADING-DATA.
> 003790 05 HEADF-01 PIC X(011), VALUE "ITEM NUMBER".
> 003820 05 ABVHED01 PIC X(005), VALUE "ITEM#".
> 003850 05 HEADF-1A PIC X(006) VALUE "SUFFIX".
> 003880 05 ABVHED1A PIC XX VALUE "SF".
> 003910 05 HEADF-02 PIC X(020), VALUE
> 003940 " DESCRIPTION ".
> 003970 05 ABVHED02 PIC X(005), VALUE "DESC.".
> 004000 05 HEADF-03 PIC X(016), VALUE "QUANTITY ON HAND".
> 004030 05 ABVHED03 PIC X(013), VALUE " QTY-ON-HAND ".
> 004060 05 HEADF-04 PIC X(017), VALUE "QUANTITY ON ORDER".
> 004090 05 ABVHED04 PIC X(013), VALUE "QTY-ON-ORDER".
> 004120 05 HEADF-05 PIC X(007), VALUE
> 004150 " WIDTH ".
> 004180 05 ABVHED05 PIC X(007), VALUE "WIDTH".
> 004210 05 HEADF-06 PIC X(007), VALUE "LENGTH".
> 004240 05 ABVHED06 PIC X(007), VALUE "LENGTH".
> 004270 05 HEADF-07 PIC X(015), VALUE
> 004300 "POUNDS PER FOOT".
> 004330 05 ABVHED07 PIC X(015), VALUE
> 004360 "POUNDS PER FOOT".
> 004390 05 HEADF-08 PIC X(015), VALUE
> 004420 "COST PER POUND".
> 004450 05 ABVHED08 PIC X(015), VALUE
> 004480 "COST PER POUND".
> 004270 05 HEADF-A7 PIC X(015), VALUE
> 004300 "PRICE PER FOOT".
> 004390 05 HEADF-A8 PIC X(015), VALUE
> 004420 "COST PER FOOT ".
> 004510 05 HEADF-09 PIC X(008), VALUE "LOCATION".
> 004540 05 ABVHED09 PIC X(008), VALUE "LOCATION".
> 004570 05 HEADF-10 PIC X(016), VALUE
> 004600 "RETAIL PER POUND".
> 004630 05 ABVHED10 PIC X(016), VALUE
> 004660 "RETAIL PER POUND".
> 004570 05 HEADF-A10 PIC X(016), VALUE
> 004600 "RETAIL PER FOOT ".
> 004510 05 HEADF-11 PIC X(008), VALUE "PR-CODE ".
> 004540 05 ABVHED11 PIC X(008), VALUE "PR-CODE ".
> 004690 01 DASH-DATA.
> 004720 05 DASHF-01 PIC X(010), VALUE "----------".
> 004750 05 DASHF-1A PIC X(002), VALUE "--".
> 004780 05 DASHF-02 PIC X(024), VALUE
> 004810 "------------------------".
> 004840 05 DASHF-03 PIC X(013), VALUE "-------------".
> 004870 05 DASHF-04 PIC X(013), VALUE "-------------".
> 004900 05 DASHF-05 PIC X(008), VALUE
> 004930 "--------".
> 004960 05 DASHF-06 PIC X(008), VALUE "--------".
> 004990 05 DASHF-07 PIC X(008), VALUE "--------".
> 005020 05 DASHF-08 PIC X(008), VALUE "--------".
> 005050 05 DASHF-09 PIC X(010), VALUE "----------".
> 005080 05 DASHF-10 PIC X(008), VALUE "--------".
> 004750 05 DASHF-11 PIC X(001), VALUE "P".
> 005140 01 CURSOR01 PIC 9(005), VALUE 04003.
> 005170* ITEM NUMBER
> 005200 01 INPUT-01 PIC 9(010).
> 005230 01 OUTPUT01 REDEFINES INPUT-01 PIC 9(010).
> 005260 01 TESTTP01 REDEFINES INPUT-01 PIC X(010).
> 005290 01 CURSOR1A PIC 9(005), VALUE 04015.
> 005320 01 INPUT-1A PIC X(002).
> 005350 01 OUTPUT1A REDEFINES INPUT-1A PIC XX.
> 005380 01 TESTTP1A REDEFINES INPUT-1A PIC XX.
> 005410 01 CURSOR02 PIC 9(005), VALUE 04025.
> 005440* DESCRIPTION
> 005470 01 INPUT-02 PIC X(024).
> 005500 01 OUTPUT02 REDEFINES INPUT-02 PIC X(024).
> 005530 01 TESTTP02 REDEFINES INPUT-02 PIC X(024).
> 005560 01 CURSOR03 PIC 9(005), VALUE 10002.
> 005590* QUANTITY ON HAND
> 005620 01 INPUT-03 PIC S9(010)V9999.
> 005650 01 OUTPUT03 REDEFINES INPUT-03 PIC Z(009).9999-.
> 005680 01 TESTTP03 REDEFINES INPUT-03 PIC X(015).
> 005710 01 CURSOR04 PIC 9(005), VALUE 10020.
> 005740* QUANTITY ON ORDER
> 005770 01 INPUT-04 PIC S9(010)V9999.
> 005800 01 OUTPUT04 REDEFINES INPUT-04 PIC Z(009).9999-.
> 005830 01 TESTTP04 REDEFINES INPUT-04 PIC X(015).
> 005860 01 CURSOR05 PIC 9(005), VALUE 14003.
> 005890** WIDTH
> 005920 01 INPUT-05 PIC S9(003)V9999.
> 005950 01 OUTPUT05 REDEFINES INPUT-05 PIC Z(002).9999-.
> 005980 01 TESTTP05 REDEFINES INPUT-05 PIC X(008).
> 006010 01 CURSOR06 PIC 9(005), VALUE 14021.
> 006040** HEIGHT
> 006070 01 INPUT-06 PIC S9(003)V9999.
> 006100 01 OUTPUT06 REDEFINES INPUT-06 PIC Z(002).9999-.
> 006130 01 TESTTP06 REDEFINES INPUT-06 PIC X(008).
> 006160 01 CURSOR07 PIC 9(005), VALUE 18002.
> 006190** POUNDS PER FOOT
> 006220 01 INPUT-07 PIC S9(004)V9999.
> 006250 01 OUTPUT07 REDEFINES INPUT-07 PIC Z(003).9999-.
> 006280 01 TESTTP07 REDEFINES INPUT-07 PIC X(009).
> 006310 01 CURSOR08 PIC 9(005), VALUE 18025.
> 006340** COST PER POUND
> 006370 01 INPUT-08 PIC S9(004)V9999.
> 006400 01 OUTPUT08 REDEFINES INPUT-08 PIC Z(003).9999-.
> 006430 01 TESTTP08 REDEFINES INPUT-08 PIC X(009).
> 006460 01 CURSOR09 PIC 9(005), VALUE 14065.
> 006490** FILLER-5
> 006520 01 INPUT-09 PIC X(015).
> 006550 01 OUTPUT09 REDEFINES INPUT-09 PIC X(015).
> 006580 01 TESTTP09 REDEFINES INPUT-09 PIC X(015).
> 006610 01 CURSOR10 PIC 9(005), VALUE 18045.
> 006640 01 INPUT-10 PIC S9(004)V9999.
> 006670 01 OUTPUT10 REDEFINES INPUT-10 PIC Z(003).9999-.
> 006700 01 TESTTP10 REDEFINES INPUT-10 PIC X(009).
> 005290 01 CURSOR11 PIC 9(005), VALUE 04055.
> 005320 01 INPUT-11 PIC X(001).
> 005350 01 OUTPUT11 REDEFINES INPUT-11 PIC X.
> 005380 01 TESTTP11 REDEFINES INPUT-11 PIC X.
> 006730 01 CC-LC.
> 006760 05 CC-LINE PIC 99.
> 006790 05 CC-COL PIC 999.
> 006820 01 REDF-CCL REDEFINES CC-LC.
> 006850 02 L PIC 99.
> 006880 02 P PIC 999.
> 006910 01 PRINTER-HEAD.
> 006940 02 FILLER PIC X(06) VALUE " DATE".
> 006970 02 PRT-DATE PIC X(20) VALUE SPACES.
> 007000 02 FILLER PIC X(30) VALUE "RECORD PRINT FOR FILE -".
>
> 007030 02 PRT-NAME PIC X(30) VALUE SPACES.
> 007060 02 FILLER PIC X(10) VALUE " PAGE ".
> 007090 02 PG-CTR PIC 999 VALUE ZEROS.
> 007120 02 FILLER PIC X(5) VALUE SPACES.
> 007150 02 PRT-TIME PIC 9(8) VALUE ZEROS.
> 007180 01 CPU-DATE.
> 007210 02 CPU-YR PIC 99.
> 007240 02 CPU-MO PIC 99.
> 007270 02 CPU-DA PIC 99.
> 007300 01 REFORMATT-DATE.
> 007330 02 RFD-MO PIC 99.
> 007360 02 FILLER PIC X VALUE "/".
> 007390 02 RFD-DA PIC 99.
> 007420 02 FILLER PIC X VALUE "/".
> 007450 02 RFD-YR PIC 99.
> 007451 01 DUP-RECD.
> 007452 05 DUP-SW PIC X VALUE SPACE.
> 007453 05 DUP-DESC PIC X(24) VALUE SPACES.
> 007454 05 DUP-PDS PIC S9(3)V999 VALUE ZEROS.
> 007455 05 DUP-CST PIC S9(3)V999 VALUE ZEROS.
> 007456 05 DUP-RET PIC S9(3)V999 VALUE ZEROS.
> 007452 05 DUP-PRC PIC X VALUE SPACE.
> 007456**
> 007456 01 SCR-LINE PIC X(80) VALUE SPACES.
> 001840 01 SCR-LINE1.
> 001870 05 FILLER PIC X(001).
> 001900 05 SCRFLD01 PIC X(010).
> 001930 05 FILLER PIC X(003).
> 001960 05 SCRFLD1A PIC XX.
> 001990 05 FILLER PIC X(003).
> 002020 05 SCRFLD02 PIC X(024).
> 002050 05 FILLER PIC X(005).
> 002080 05 SCRFLD09 PIC X(016).
> 002110 05 SCRFLD03 PIC X(015).
> 002200 01 SCR-LINE2.
> 002230 05 FILLER PIC X(001).
> 002260 05 SCRFLD05 PIC X(015).
> 002290 05 FILLER PIC X(002).
> 002320 05 SCRFLD06 PIC X(010).
> 002350 05 FILLER PIC X(002).
> 002380 05 SCRFLD07 PIC X(010).
> 002410 05 FILLER PIC X(002).
> 002440 05 SCRFLD08 PIC X(010).
> 002470 05 FILLER PIC X(002).
> 002500 05 SCRFLD10 PIC X(016).
> 002200 01 SCR-LINE3.
> 002530 05 FILLER PIC X(002).
> 002560 05 SCRFLD9A PIC X(015).
> 002590 05 SCRFLD11 PIC X(014).
>
> Now i'm pretty sure that the information here is the copybook
> info....right? So do i copy this info out put it in a new file? If so
> does the tabbing and spacing matter for copybook files?
>
> Thanks again for the help
> James J. Gavan wrote:
>
>
>
| |
| Richard 2006-08-30, 6:55 pm |
|
Starkey2600@gmail.com wrote:
> 000010 IDENTIFICATION DIVISION.
> 000040 PROGRAM-ID. PRD020SR.
> 000070*
> 000100* THIS PROGRAM DOES ADDS CHANGES INQUIRYS DELETES OR
> 000130* PRINTS THE
> 000160* RAW MATERIAL INVENTORY
[...]
> 000400 INPUT-OUTPUT SECTION.
> 000430 FILE-CONTROL.
The next bit is the 'select assign'
> 000460 SELECT MASTER ASSIGN TO RANDOM,
> 000520** "RAWINVTY"
> 000490 "/usr/jlw/datafiles/RAWINVTY" <--- actual file name
> 000550 ORGANIZATION IS INDEXED,
> 000580 ACCESS IS DYNAMIC,
> 000610 RECORD KEY IS MAST-KEY1,
> 000640 ALTERNATE RECORD KEY IS FIELD-02 WITH DUPLICATES
> 000670 FILE STATUS IS FS.
> 000700 SELECT PRINTFL ASSIGN TO PRINT, "PRINTER".
> 000730 DATA DIVISION.
> 000760 FILE SECTION.
FD = 'File Definition'
> 000790 FD MASTER,
> 000820 RECORD CONTAINS 127 CHARACTERS,
> 000850 BLOCK CONTAINS 002 RECORDS,
> 000880 LABEL RECORDS ARE STANDARD,
> 000910*
> 000940 DATA RECORD IS MAST-RECD.
01 = Record layout of the file.
> 000970 01 MAST-RECD.
> 001000* ITEM NUMBER
> 001030 05 FIELD-01 PIC 9(010).
> 001060 05 FIELD-1A PIC XX.
> 001090* DESCRIPTION
> 001120 05 FIELD-02 PIC X(024).
> 001150* QUANTITY ON HAND
> 001180 05 FIELD-03 PIC S9(009)V9999, COMP-3.
> 001210* QUANTITY ON ORDER
> 001240 05 FIELD-04 PIC S9(009)V9999, COMP-3.
> 001270* WIDTH
> 001300 05 FIELD-05 PIC S9(003)V9999.
> 001330* LENGTH
> 001360 05 FIELD-06 PIC S9(003)V9999.
> 001390* POUNDS PER FOOT
> 001420 05 FIELD-07 PIC S9(003)V9999.
> 001450* COST PER POUND
> 001480 05 FIELD-08 PIC S9(003)V9999.
> 001510* LOCATION
> 001540 05 FIELD-09 PIC X(010).
> 001570* RETAIL PER FOOT
> 001600 05 FIELD-10 PIC S9(003)V9999.
> 001510* PRICE CODE (P=PRICE PER POUND F = PRICE PER FOOT)
> 001540 05 FIELD-11 PIC X(001).
> 001630 05 FILLER PIC X(026).
> 001660 01 KEY-FIELD1.
> 001690 05 MAST-KEY1 PIC X(012).
> 001720 05 REDF-KEY1 REDEFINES MAST-KEY1 PIC X(012).
> 001750 05 FILLER PIC X(115).
end of record layout of 'Master'.
FD for printer
> 001780 FD PRINTFL LABEL RECORDS ARE OMITTED.
> 001810 01 FULL-PRINT PIC X(132).
> 001840 01 PRINT1.
> 001870 05 FILLER PIC X(001).
To make a 'copybook' for the Raw Material Inventory record layout
create a new text file called, say. rawmatrl.cpy and put lines 000970
thru 001750 into it.
Optionally yo can then delete lines 000970 thru 001750 from the source
of the program and replace with the line:
COPY "rawmatrl.cpy".
(with COPY starting in column 12 and with a full stop at the end).
|
|
|
|
|