For Programmers: Free Programming Magazines  


Home > Archive > Cobol > February 2006 > Source control and directory structure









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 Source control and directory structure
kjdames

2006-02-17, 6:55 pm

This is my first inquiry into source control and I am looking for some
advice. I work in a small (3 programmers) cobol shop and need to get
some sort of source control going. Until recently I was the only coder
but now that I have some padawans I need to take steps to protect my
code base.

I'm having difficulty figuring out how to get source control working
for me. All of my coding is done by telnet into a linux box. I
basically only use 5 directories:

1. "programs" where the source code (uncompiled) programs exist. All
1000 of them.
2. "data" where the data files exist
3. "includes" that has file definitions (about 1000 files) shared by
many programs
4. "lib" that has library routines (about 150 files) shared by many
programs
5. "compiled" where the compiled programs exist. These programs
collectively make up the business software my employer uses.

The part I'm having trouble with is how to get the programs, includes,
and library routines into source control. I need all the includes to
be in one directory and all library routines to be in their own
directory so I only can ever have one copy of the truth.

Is there a better way to set up my structure, or would this setup work
just fine with something like subversion? Or would CVS be better for
me?

Alain Reymond

2006-02-18, 7:55 am

You should definitly opt for a source control and versioning system.
There are many open source possibilities. You do not have to buy
anything and it will give you more control and security over your source
code.
If the code resides on a linux box - which seems to be the case - you
can use the standard CVS or Subversion.
If the clients are under Windows, you can use TortoiseCVS or TortoiseSVN
as interface to CVS of Subversion.
And you can use jEdit as an editor to code you cobol code. It has a
syntax coloring scheme for cobol and a ftp and a cvs plugin.

So, you may find many tools to manage your cvs system.

Regards.

Alain


kjdames a écrit :
> This is my first inquiry into source control and I am looking for some
> advice. I work in a small (3 programmers) cobol shop and need to get
> some sort of source control going. Until recently I was the only coder
> but now that I have some padawans I need to take steps to protect my
> code base.
>
> I'm having difficulty figuring out how to get source control working
> for me. All of my coding is done by telnet into a linux box. I
> basically only use 5 directories:
>
> 1. "programs" where the source code (uncompiled) programs exist. All
> 1000 of them.
> 2. "data" where the data files exist
> 3. "includes" that has file definitions (about 1000 files) shared by
> many programs
> 4. "lib" that has library routines (about 150 files) shared by many
> programs
> 5. "compiled" where the compiled programs exist. These programs
> collectively make up the business software my employer uses.
>
> The part I'm having trouble with is how to get the programs, includes,
> and library routines into source control. I need all the includes to
> be in one directory and all library routines to be in their own
> directory so I only can ever have one copy of the truth.
>
> Is there a better way to set up my structure, or would this setup work
> just fine with something like subversion? Or would CVS be better for
> me?
>

Michael Wojcik

2006-02-20, 6:55 pm


In article <1140213838.150787.271940@g44g2000cwa.googlegroups.com>, "kjdames" <krisda@childrensfactory.com> writes:
> This is my first inquiry into source control and I am looking for some
> advice. I work in a small (3 programmers) cobol shop and need to get
> some sort of source control going. Until recently I was the only coder
> but now that I have some padawans I need to take steps to protect my
> code base.


I think it's a good idea even if you're the only person who touches
those files. I use source control for all sorts of documents on my
work machines, including ones that no one else ever sees (or edits,
anyway). That lets me track changes, recover from errors, easily
synchronize files between systems, etc.

> I'm having difficulty figuring out how to get source control working
> for me. All of my coding is done by telnet into a linux box.


OK, so you'll want a command-line SCM system that works on Linux.

> I basically only use 5 directories:
>
> 1. "programs" where the source code (uncompiled) programs exist. All
> 1000 of them.
> 2. "data" where the data files exist
> 3. "includes" that has file definitions (about 1000 files) shared by
> many programs
> 4. "lib" that has library routines (about 150 files) shared by many
> programs


Source or object?

> 5. "compiled" where the compiled programs exist. These programs
> collectively make up the business software my employer uses.
>
> The part I'm having trouble with is how to get the programs, includes,
> and library routines into source control. I need all the includes to
> be in one directory and all library routines to be in their own
> directory so I only can ever have one copy of the truth.


That shouldn't be a problem for any competent SCM system. It'd work
fine even with relatively old, primitive ones like SCCS and RCS,
unless the files in "lib" are binary. (SCCS and RCS don't do well
with binary files, traditionally, though later versions of GNU RCS
are better at it.)

But you might as well use something more recent, such as CVS.

> Is there a better way to set up my structure,


I suspect there is - 1000 files in a single directory is not a good
use of the Unix hierarchical filesystem model - but for source
control purposes it doesn't much matter. Most of these systems will
operate on specified files, or all the files in specified director-
ies, or all the files in specified directory trees (recursively),
depending on what options you give a command. They don't really care
how you organize your files.

> or would this setup work just fine with something like subversion?


I haven't used Subversion, but I expect it would.

> Or would CVS be better for me?


I'd recommend CVSNT, which is available for Linux and various Unix
platforms as well as Windows. It's an enhanced implementation of
CVS, and it's available in both free, open-source form and in a
commercial suite with enhancments and support. It's easy to set up
and use a basic CVS repository, and you can start using more powerful
features as you need them.

CVS has a very user-friendly model: you can edit files anytime you
like, update your working copy ("sandbox") anytime, and commit your
changes anytime. If someone else commits a change to a file between
the time when you updated your sandbox and you commit your changes to
that file, CVS will automatically merge your changes in if there are
no conflicts. If there are conflicts, CVS will produce a version of
the file with them highlighted so you can edit them appropriately and
check in a new version.

CVS handles binary files fairly well, so you could put your data
files and even your compiled programs under CVS control if you want.
(The latter is useful for preserving releases, for example, so you
can quickly retrieve them if you need to test for a regression or
some such.)

Once you've installed CVS, it takes only a few minutes to follow the
instructions for creating repositories, and then you're good to go.

CVS also works well over networks, so it would give you the option of
checking out a sandbox to a local machine, editing there, and
committing your changes back to your Linux system, rather than doing
everything over Telnet. (Not that there's anything wrong with
Telnet.)

You can get CVSNT from www.march-hare.com, if your Linux distribution
doesn't provide it.

--
Michael Wojcik michael.wojcik@microfocus.com

Recently, they appeared at the reopening of the Brookdale Library,
luring passersby with the opportunity to be anonymously silly.
Sponsored Links







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

Copyright 2008 codecomments.com