Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: COPY statement
John Culleton wrote:
> Richard wrote:
> 
>
> As a side note, you don't really need to change the field names. You can
> either have just a single instance of the record layout in WORKING-STORAGE
> shared by all files or you can limit your copybook to the 02 etc. lines.
> So you can then have:
>
> 01  FIRST-RECORD-LAYOUT.
>     COPY MYLAYOUT.
> 01  SECOND-RECORD-LAYOUT.
>     COPY MYLAYOUT.
>
> When you need to process these record layouts you can use qualified field
> names such as
> NUMBER-FIELD OF FIRST-RECORD-LAYOUT
> or
> NUMBER-FIELD OF SECOND-RECORD-LAYOUT etc.
>
> MOVE CORRESPONDING makes use of identical field names in interesting ways 
as
> well.

I can't tell you how intensely I dislike the use of qualified field
names. It gets to be rather boring very soon and totally offsets the
small benefit of MOVE CORRESPONDING. But that is just me and I'm by no
means the most able COBOL coder in the world.


Report this thread to moderator Post Follow-up to this message
Old Post
Mike
09-29-05 11:55 PM


Re: COPY statement
In article <1128008019.578495.151410@z14g2000cwz.googlegroups.com>,
Mike <MPBrede@gmail.com> wrote:
>
>John Culleton wrote:

[snip]
 
>
>I can't tell you how intensely I dislike the use of qualified field
>names. It gets to be rather boring very soon and totally offsets the
>small benefit of MOVE CORRESPONDING.

I find that I have similar tastes.  I would much rather code/read

MOVE REC01-LAYOUT-NUMFLD  TO  REC02-LAYOUT-NUMFLD

... than ...

MOVE NUMFLD OF REC01-LAYOUT  TO  NUMFLD OF REC02-LAYOUT

... as well.  MOVE CORR is something that I use with caution and only when
there is ample precedent in the environment for it; I've rarely introduced
it to a site where it isn't already common.

DD


Report this thread to moderator Post Follow-up to this message
Old Post

09-30-05 08:55 AM


Re: COPY statement
On Fri, 30 Sep 2005 06:45:11 +0000 (UTC), docdwarf@panix.com () wrote:

>In article <1128008019.578495.151410@z14g2000cwz.googlegroups.com>,
>Mike <MPBrede@gmail.com> wrote: 
>
>[snip]
> 
>
>I find that I have similar tastes.  I would much rather code/read
>
>MOVE REC01-LAYOUT-NUMFLD  TO  REC02-LAYOUT-NUMFLD
>
>... than ...
>
>MOVE NUMFLD OF REC01-LAYOUT  TO  NUMFLD OF REC02-LAYOUT
>
>... as well.  MOVE CORR is something that I use with caution and only when
>there is ample precedent in the environment for it; I've rarely introduced
>it to a site where it isn't already common.
>
>DD

I too detest the OF construction but consider the existence of
multiple record descriptions for the same record a worse evil.  COPY
REPLACING LEADING in the 2002 standard is a partial solution.  My
preference for C style qualification syntax has received mixed
reviews.

Report this thread to moderator Post Follow-up to this message
Old Post
Clark Morris
09-30-05 11:55 PM


Re: COPY statement
In article <m2jqj1tu50nf61dif3cmki1vgqmfo464it@4ax.com>,
Clark Morris  <cfmtech@istar.ca> wrote:
>On Fri, 30 Sep 2005 06:45:11 +0000 (UTC), docdwarf@panix.com () wrote:
> 
>
>I too detest the OF construction but consider the existence of
>multiple record descriptions for the same record a worse evil.

I'm not sure what there is written here which requires 'multiple record
descriptions for the same record'; what I had in mind when I gave the
examples above was along the lines of

MOVE MSTRFIL-EMP-BDATE  TO  OPUTFIL-EMP-BDATE

... where the MSTRFIL layout is... well, an employee master file record
layout and the OPUTFIL layout is something, entire... say, a record in a
file that gets sent out for a credit-check.

DD

Report this thread to moderator Post Follow-up to this message
Old Post

10-01-05 02:55 AM


Re: COPY statement
On Sat, 1 Oct 2005 01:36:43 +0000 (UTC), docdwarf@panix.com () wrote:

>In article <m2jqj1tu50nf61dif3cmki1vgqmfo464it@4ax.com>,
>Clark Morris  <cfmtech@istar.ca> wrote: 
>
>I'm not sure what there is written here which requires 'multiple record
>descriptions for the same record'; what I had in mind when I gave the
>examples above was along the lines of
>
>MOVE MSTRFIL-EMP-BDATE  TO  OPUTFIL-EMP-BDATE
>
>... where the MSTRFIL layout is... well, an employee master file record
>layout and the OPUTFIL layout is something, entire... say, a record in a
>file that gets sent out for a credit-check.

I was referring to using the different iterations of the same
description to describe the master file and internal work area(s) or
the input and output versions of the same record for the few instances
left where a sequential file is updated in batch.
>
>DD

Report this thread to moderator Post Follow-up to this message
Old Post
Clark Morris
10-01-05 11:55 PM


Re: COPY statement
In article <4rtsj19h3e1j2pijak74kq67k3kn3ht0uu@4ax.com>,
Clark Morris  <cfmtech@istar.ca> wrote:
>On Sat, 1 Oct 2005 01:36:43 +0000 (UTC), docdwarf@panix.com () wrote:
> 
>
>I was referring to using the different iterations of the same
>description to describe the master file and internal work area(s) or
>the input and output versions of the same record for the few instances
>left where a sequential file is updated in batch.

Ahhhhh, I see... thanks much for the clarification.

DD


Report this thread to moderator Post Follow-up to this message
Old Post

10-02-05 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:57 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.