For Programmers: Free Programming Magazines  


Home > Archive > Cobol > December 2007 > What are CopyBook files ? and others ?









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 What are CopyBook files ? and others ?
Will

2007-12-13, 6:56 pm

I posted earlier that I had an old Cobol App for which we needed to extract
the data.

The app is running on an old DOS 6.2 system... not windows.

In one folder/directory I see file pairs like...

filexyz.FIL
filexyz.IDX

another folder/directory is named CopyBook and i see files ending in

..cpy and .SEL and .WKS and .RTN

Thanks for any help.



2007-12-13, 6:56 pm

In article <4761721c$0$15394$4c368faf@roadrunner.com>,
Will <Will@somewhere.com> wrote:
>I posted earlier that I had an old Cobol App for which we needed to extract
>the data.


Still at it, eh?

>
>The app is running on an old DOS 6.2 system... not windows.
>
>In one folder/directory I see file pairs like...
>
>filexyz.FIL
>filexyz.IDX
>
>another folder/directory is named CopyBook and i see files ending in
>
>.cpy and .SEL and .WKS and .RTN
>
>Thanks for any help.


I'd suggest you look for something like filexyz.cpy or filexyz.wks and
you'd be on your way... but if you need more help than that you might want
to hire somebody who knows what they are doing.

DD

Will

2007-12-13, 6:56 pm

The .cpy and .wks files have old dates.

The .fil and .idx files have recent dates

This leads me to think that the .fil and .idx files may contain the data...

Ane opening them with Notepad I can see ASCII characters and text strings in
the files.

I was just wondering what the Copybook files were.

I can load them in a text editor and they look like source files.

None of the Batch files seem to reference them.

It seems the Batch file that launches the program goes off and loads some
stuff using the SET command... I guess it is initilizing before launching
the program...

Then it runs a program named hs-start.com

I have created my own batch file to duplicate the sequence of startup events
and it seems to run in a CMD window...

But, when it launches hs-start.com it just returns to the DOS prompt.

I'm not sure but I think hs-start launches an Application that establishes
some sort of GUI in the old DOS 6.2 system...

But so far I haven't been able to get the program to actually run on
anything other than the original DOS 6.2 machine... doesn't want to run in a
CMD window under XP-Pro.

Any tips may help.

thanks everyone.


<docdwarf@panix.com> wrote in message news:fjrstc$6u2$1@reader1.panix.com...
> In article <4761721c$0$15394$4c368faf@roadrunner.com>,
> Will <Will@somewhere.com> wrote:
>
> Still at it, eh?
>
>
> I'd suggest you look for something like filexyz.cpy or filexyz.wks and
> you'd be on your way... but if you need more help than that you might want
> to hire somebody who knows what they are doing.
>
> DD
>



William M. Klein

2007-12-13, 6:56 pm

See below

--
Bill Klein
wmklein <at> ix.netcom.com
"Will" <Will@somewhere.com> wrote in message
news:4761721c$0$15394$4c368faf@roadrunne
r.com...
>I posted earlier that I had an old Cobol App for which we needed to extract the
>data.
>
> The app is running on an old DOS 6.2 system... not windows.
>
> In one folder/directory I see file pairs like...
>
> filexyz.FIL
> filexyz.IDX


These are probably the "data" (the files) themselves). Not guaranteed, but if
you see pairs iwth ".FIL" and ".IDDX" but the same base name, then PROBABLY this
is a "single" Indexed file (whtat COBOL often calls Indexed Sequential). If you
know products like Btrieve and C-ISAM, this is smilar to those. You *might* be
able to understand the data in the .FIL file, but the chances are that the .IDX
file would look like garbage - unless you knew the compilers proprietary system.
Whatever you do, do NOT "edit" (change) either of these files outside the COBOL
system - if you ever want to use them again.

>
> another folder/directory is named CopyBook and i see files ending in
>
> .cpy and .SEL and .WKS and .RTN


This are PROBABLY part of the SOURCE code for the program(s) that created and
used the actual data file. A COPY programmer could look at these (even via a
text editor) and tell you exactly what is what.
...SEL is probably the COBOL Select/Assign information
... WKS is probably a Working-Storage record (or part of the record).

as for ...CPY and ...RTN, the first can be ANYTHING (from data descriptions to
procedural logic, even to comments).
...RTN might be "return codes" or "routines". I would need to see the file to
actually figure it out.

>
> Thanks for any help.
>
>
>



William M. Klein

2007-12-13, 6:56 pm

The chances are that you are missing the "COBOL run-time" on the new machine.
Did the old "startup" include any SET statements for PATH or LIBPATH or anything
with COB at the beginning? If so, do you have those directories/files on the
new machine?

Some (not all) old COBOL run-time had "machine specific" protection so that you
couldn't just "copy" a run-time to a new machine and run your old programs.

If you can show us the SET statements for PATH, LIBPATH, or COB??? from your old
machine, we MAY be able to help more. I think that someone replied to your
original post with a suggestion that you type
COBOL
from the command line on your old machine and see if that tells you what product
was on it.

--
Bill Klein
wmklein <at> ix.netcom.com
"Will" <Will@somewhere.com> wrote in message
news:47618669$0$8624$4c368faf@roadrunner
.com...
> The .cpy and .wks files have old dates.
>
> The .fil and .idx files have recent dates
>
> This leads me to think that the .fil and .idx files may contain the data...
>
> Ane opening them with Notepad I can see ASCII characters and text strings in
> the files.
>
> I was just wondering what the Copybook files were.
>
> I can load them in a text editor and they look like source files.
>
> None of the Batch files seem to reference them.
>
> It seems the Batch file that launches the program goes off and loads some
> stuff using the SET command... I guess it is initilizing before launching the
> program...
>
> Then it runs a program named hs-start.com
>
> I have created my own batch file to duplicate the sequence of startup events
> and it seems to run in a CMD window...
>
> But, when it launches hs-start.com it just returns to the DOS prompt.
>
> I'm not sure but I think hs-start launches an Application that establishes
> some sort of GUI in the old DOS 6.2 system...
>
> But so far I haven't been able to get the program to actually run on anything
> other than the original DOS 6.2 machine... doesn't want to run in a CMD window
> under XP-Pro.
>
> Any tips may help.
>
> thanks everyone.
>
>
> <docdwarf@panix.com> wrote in message news:fjrstc$6u2$1@reader1.panix.com...
>
>



tlmfru

2007-12-13, 6:56 pm

The FIL and IDX pairs are the data and index parts, respectively, of ISAM
files. Implementation of ISAM files is vendor dependent, but at least one
format had for the data portion a file header followed by each record in
ordinary ASCII text. If that's the case you'll notice that the records line
up when you get into the file a certain distance. The IDX format probably
can't be determined without a utility or an immense amount of sleuthing.

The COPYBOOK directory contains segments of source code that are inserted
into the source program at compile time. This is usually done where a
section of code is used in many programs.

Many of these old run-time systems fired up first a big executable which
provided the facilities needed to run the actual program: file I/O, screen
handler/GUI, and at least in one case I know of, decimal arithmetic. You're
probably right about hs-start.com. But there must be an hs-start somewhere
on your DOS 6.2 system or else it wouldn't run there either. Once you find
that, you may also find help or readme files or programs, or utilities such
as exports.

Will XP still run dos programs??

Bill Klein's comments are correct.

PL


Will <Will@somewhere.com> wrote in message
news:47618669$0$8624$4c368faf@roadrunner
.com...
> The .cpy and .wks files have old dates.
>
> The .fil and .idx files have recent dates
>
> This leads me to think that the .fil and .idx files may contain the

data...
>
> Ane opening them with Notepad I can see ASCII characters and text strings

in
> the files.
>
> I was just wondering what the Copybook files were.
>
> I can load them in a text editor and they look like source files.
>
> None of the Batch files seem to reference them.
>
> It seems the Batch file that launches the program goes off and loads some
> stuff using the SET command... I guess it is initilizing before launching
> the program...
>
> Then it runs a program named hs-start.com
>
> I have created my own batch file to duplicate the sequence of startup

events
> and it seems to run in a CMD window...
>
> But, when it launches hs-start.com it just returns to the DOS prompt.
>
> I'm not sure but I think hs-start launches an Application that establishes
> some sort of GUI in the old DOS 6.2 system...
>
> But so far I haven't been able to get the program to actually run on
> anything other than the original DOS 6.2 machine... doesn't want to run in

a
> CMD window under XP-Pro.
>
> Any tips may help.
>
> thanks everyone.
>
>
> <docdwarf@panix.com> wrote in message

news:fjrstc$6u2$1@reader1.panix.com...
want[color=darkred]
>
>



2007-12-13, 6:56 pm

In article <47618669$0$8624$4c368faf@roadrunner.com>,
Will <Will@somewhere.com> wrote:
>The .cpy and .wks files have old dates.
>
>The .fil and .idx files have recent dates
>
>This leads me to think that the .fil and .idx files may contain the data...
>
>Ane opening them with Notepad I can see ASCII characters and text strings in
>the files.
>
>I was just wondering what the Copybook files were.


[snip]

><docdwarf@panix.com> wrote in message news:fjrstc$6u2$1@reader1.panix.com...


[snip]
[color=darkred]

It appears as though the second half of my suggestion is appearing to be
more and more applicable.

DD

Will

2007-12-13, 6:56 pm

Bill and others... First thanks again for the help. Here is some more
info...

===== On the disk:
c:\pgm\files\ (This contains all the .FIL and .IDX... pluse one
..NDX file)
c:\pgm\programs\ (Here are .CBL, .CSI, .GNT, .IDX, .IDY, .INT, .MSG,
..VO1-5, .WRK, .XXX and 2 .COM files... hs-beg.com & hs-end.com
c:\MF-RTE\ (here are .CBL, .CFG, .DLE, .DLL, .EXE, .GNT, .LBR,
..LIB, .OBJ, .PRF, and .SYS files)

===== Startup Batch File:
REM ..Load External File Names
SET F1=c:\PGM\FILES\CONTROL.FIL
SET F2=c:\PGM\FILES\CONTDATA.FIL
SET F3=c:\PGM\FILES\AUDIT.FIL
SET F4=c:\PGM\FILES\ITEMMST.FIL
SET F5=c:\PGM\FILES\OWNERMST.FIL
SET F6=c:\PGM\FILES\PLOTMSTR.FIL
SET F7=c:\PGM\FILES\TRUSTBNK.FIL
SET F8=c:\PGM\FILES\INTERINF.FIL
SET F9=c:\PGM\FILES\NOTES01.FIL
SET FA=c:\PGM\FILES\SALESMAN.FIL
SET FB=c:\PGM\FILES\SMANSALE.FIL
SET COBDIR=c:\MF-RTE
SET LIB=\c:MF-RTE
SET DSDIR=c:\MF-RTE
SET COBSW=-F
CD \PGM\PROGRAMS
Echo launching hs-beg.com
hs-beg
=====
Maybe it is as you say BILL... and it can't find the Runtime file... but I'd
say it is in the c:\MF-RTE\ folder... do you agree?
Would the Runtime File be a .com file or .exe file on an old DOS 6.2 PC...
or would the file extension be something else?

Any more idea's on why we can't get the program to run... unless old DOS
programs won't run in an XP-Pro Cmd window ???

Thanks again for the help.



Robert

2007-12-13, 6:56 pm

On Thu, 13 Dec 2007 12:55:49 -0500, "Will" <Will@somewhere.com> wrote:

>I posted earlier that I had an old Cobol App for which we needed to extract
>the data.
>
>The app is running on an old DOS 6.2 system... not windows.
>
>In one folder/directory I see file pairs like...
>
>filexyz.FIL
>filexyz.IDX
>
>another folder/directory is named CopyBook and i see files ending in
>
>.cpy and .SEL and .WKS and .RTN
>
>Thanks for any help.


..dat is the data you want. .cpy is the record layout.

1. Look at the record layout. If there are no COMP fields, all numbers are ASCII, meaning
conversion will be easiest. If there are COMP, COMP-4 or COMP-5, binary integers (unless
the pic has a V), conversion will be moderately difficult. If there are COMP-3, packed
decimal, conversion will be most difficult.

2. Are the programs .exe files?

3. Do you have access to a compiler of the same brand?
If you don't know the brand, look in the .exe files for strings like
micro focus, fujitsu or realia.

4. Look for utility programs named something like filecopy or reorganize.
William M. Klein

2007-12-13, 6:56 pm

OK,
That does give us a LOT of information.

This was a program compiled with (and run under) a Micro Focus product. I don't
remember for certain but my best guess is that

SET DSDIR=c:\MF-RTE

means that this was a Dialog Systems program. As you say it was developed for
pre-Windows DOS, then I have some serious questions that it will run under XP.
(I don't think that ADIS used this, but someone else may be able to correct me
on this)

When you run it on your old DOS machine, does it have an "interactive" screen
interface? Does that interface look like a "character based" (24 row by 80
column) rather than "GUI" interface?

Another question, on your old machine in the
\PGM\PROGRAMS
directory, what files do you have beginning
hs-beg
Do you .EXE, .GNT, .IDY, .CBL others?


It is possible that some of the "old-time" Micro Focus users in this group might
be able to help you, but you might also find MORE help at
http://forum.microfocus.com:8088/~M..._Products/login

--
Bill Klein
wmklein <at> ix.netcom.com
"Will" <Will@somewhere.com> wrote in message
news:4761b0c4$0$2551$4c368faf@roadrunner
.com...
> Bill and others... First thanks again for the help. Here is some more info...
>
> ===== On the disk:
> c:\pgm\files\ (This contains all the .FIL and .IDX... pluse one
> .NDX file)
> c:\pgm\programs\ (Here are .CBL, .CSI, .GNT, .IDX, .IDY, .INT, .MSG,
> .VO1-5, .WRK, .XXX and 2 .COM files... hs-beg.com & hs-end.com
> c:\MF-RTE\ (here are .CBL, .CFG, .DLE, .DLL, .EXE, .GNT, .LBR,
> .LIB, .OBJ, .PRF, and .SYS files)
>
> ===== Startup Batch File:
> REM ..Load External File Names
> SET F1=c:\PGM\FILES\CONTROL.FIL
> SET F2=c:\PGM\FILES\CONTDATA.FIL
> SET F3=c:\PGM\FILES\AUDIT.FIL
> SET F4=c:\PGM\FILES\ITEMMST.FIL
> SET F5=c:\PGM\FILES\OWNERMST.FIL
> SET F6=c:\PGM\FILES\PLOTMSTR.FIL
> SET F7=c:\PGM\FILES\TRUSTBNK.FIL
> SET F8=c:\PGM\FILES\INTERINF.FIL
> SET F9=c:\PGM\FILES\NOTES01.FIL
> SET FA=c:\PGM\FILES\SALESMAN.FIL
> SET FB=c:\PGM\FILES\SMANSALE.FIL
> SET COBDIR=c:\MF-RTE
> SET LIB=\c:MF-RTE
> SET DSDIR=c:\MF-RTE
> SET COBSW=-F
> CD \PGM\PROGRAMS
> Echo launching hs-beg.com
> hs-beg
> =====
> Maybe it is as you say BILL... and it can't find the Runtime file... but I'd
> say it is in the c:\MF-RTE\ folder... do you agree?
> Would the Runtime File be a .com file or .exe file on an old DOS 6.2 PC... or
> would the file extension be something else?
>
> Any more idea's on why we can't get the program to run... unless old DOS
> programs won't run in an XP-Pro Cmd window ???
>
> Thanks again for the help.
>
>
>



Richard

2007-12-13, 6:56 pm

On Dec 14, 11:23 am, "Will" <W...@somewhere.com> wrote:
> Bill and others... First thanks again for the help. Here is some more
> info...
>
> ===== On the disk:
> c:\pgm\files\ (This contains all the .FIL and .IDX... pluse one
> .NDX file)
> c:\pgm\programs\ (Here are .CBL, .CSI, .GNT, .IDX, .IDY, .INT, .MSG,
> .VO1-5, .WRK, .XXX and 2 .COM files... hs-beg.com & hs-end.com
> c:\MF-RTE\ (here are .CBL, .CFG, .DLE, .DLL, .EXE, .GNT, .LBR,
> .LIB, .OBJ, .PRF, and .SYS files)
>
> ===== Startup Batch File:
> REM ..Load External File Names
> SET F1=c:\PGM\FILES\CONTROL.FIL
> SET F2=c:\PGM\FILES\CONTDATA.FIL
> SET F3=c:\PGM\FILES\AUDIT.FIL
> SET F4=c:\PGM\FILES\ITEMMST.FIL
> SET F5=c:\PGM\FILES\OWNERMST.FIL
> SET F6=c:\PGM\FILES\PLOTMSTR.FIL
> SET F7=c:\PGM\FILES\TRUSTBNK.FIL
> SET F8=c:\PGM\FILES\INTERINF.FIL
> SET F9=c:\PGM\FILES\NOTES01.FIL
> SET FA=c:\PGM\FILES\SALESMAN.FIL
> SET FB=c:\PGM\FILES\SMANSALE.FIL
> SET COBDIR=c:\MF-RTE
> SET LIB=\c:MF-RTE
> SET DSDIR=c:\MF-RTE
> SET COBSW=-F
> CD \PGM\PROGRAMS
> Echo launching hs-beg.com
> hs-beg
> =====
> Maybe it is as you say BILL... and it can't find the Runtime file... but I'd
> say it is in the c:\MF-RTE\ folder... do you agree?
> Would the Runtime File be a .com file or .exe file on an old DOS 6.2 PC...
> or would the file extension be something else?
>
> Any more idea's on why we can't get the program to run... unless old DOS
> programs won't run in an XP-Pro Cmd window ???
>
> Thanks again for the help.



> SET COBDIR=c:\MF-RTE


This seems to indicate MF=MicroFocus RTE=Run Time Environment. That
whole directory needs to be copied to XP so that it can be used. If it
is put in a different place then change the COBDIR to point to this.

It is most likely to be Microfocus Cobol/2 and have a version number
such as 2.5 or 3.2, maybe as high as 3.4.

These should work fine on XP, I still have a similar system running on
a client site on XP.

..CBL are most likely Cobol source programs. So you should be able to
find the record definitions. They will be in FILE-SECTION following an
FD for the file.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com