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

COBOL COPYBOOK CONVERTER
OK. I have been doing this through SAS. But the maintenace has become
to great. We have flat files on mainframes that have copybooks defined
for them.

Most records have hundreds of fields. I am only interested in 20 or
so. I would like to create the output copybook layout using the same
field names as the input copybook.

Does anyone have a COBOL program that does nothing more than this?

Moreover, I would prefer to have something where I could compile the
program and pass the copybooks as PARMS in my JCL or as DD statements.
Basically something that I can reuse as long as I have an input and
output copybook layout that uses the same field names.

Any suggestions?

FYI I know JCL, SAS and SYNCSORT pretty well. Used COBOL in school
years ago so I understand just can't write from scratch.

Thanks.

Report this thread to moderator Post Follow-up to this message
Old Post
FrOsTbYtE
11-23-04 01:55 AM


Re: COBOL COPYBOOK CONVERTER
I am not clear on exactly what you are asking for the program to do.  If you
have (COBOL) copybooks that describe the input file - do you want to MANUALL
Y
create the output copybook (telling which files to keep) and then have a COB
OL
program create the output file for you?

If so, this is a pretty simple COBOL program (and could be done quite easily
).
Providing JCL to (semi-)randomly take various input/output copybooks and com
pile
the COBOL program and then run it would also be easy.

If, however, you want a COBOL program to CREATE the output copybook, then  h
ow
will you tell it which fields you want to keep and which you don't?

--
Bill Klein
wmklein <at> ix.netcom.com
"FrOsTbYtE" <frostbyte@arctic.net> wrote in message
 news:3o2qp0dsqdn9g4tgn7u5a136q64l3b18k3@
4ax.com...
> OK. I have been doing this through SAS. But the maintenace has become
> to great. We have flat files on mainframes that have copybooks defined
> for them.
>
> Most records have hundreds of fields. I am only interested in 20 or
> so. I would like to create the output copybook layout using the same
> field names as the input copybook.
>
> Does anyone have a COBOL program that does nothing more than this?
>
> Moreover, I would prefer to have something where I could compile the
> program and pass the copybooks as PARMS in my JCL or as DD statements.
> Basically something that I can reuse as long as I have an input and
> output copybook layout that uses the same field names.
>
> Any suggestions?
>
> FYI I know JCL, SAS and SYNCSORT pretty well. Used COBOL in school
> years ago so I understand just can't write from scratch.
>
> Thanks.



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
11-23-04 01:55 AM


Re: COBOL COPYBOOK CONVERTER
"Howard Brazee" <howard@brazee.net> wrote in message news:<cnt179$5at$1@peabody.colorado.ed
u>...
> On 21-Nov-2004, alistair@ld50macca.demon.co.uk (Alistair Maclean) wrote:
> 
>
> I don't understand.   Why would a move corresponding miss any move because
 of a
> cross-reference facility?

Move corresponding does not explicitly reference the subject fields
and therefore a program suite which parses the code and extracts
fields referenced by line will not explicitly pick up on the
implicitly referenced fields.

Report this thread to moderator Post Follow-up to this message
Old Post
Alistair Maclean
11-23-04 08:55 AM


Re: COBOL COPYBOOK CONVERTER
FrOsTbYtE <frostbyte@arctic.net> wrote:
>Thanks to all that have responded thus far. Actually what I am looking
>for is quite simple. I want an example of COBOL code that would:
>
>Read in a dataset (name provided in JCL)
>Read in a copybook (name provided in JCL)
>Write the dataset (name provided in JCL)
>Using a different copybook (name provided in JCL)
--snip--
>The output dataset will only contain the fields specified in the
>output copybook layout.

Is there a reason you want to use COBOL?  You're
definitely doing it the hard way.  You say:

>FYI I know JCL, SAS and SYNCSORT pretty well

This whole thing can be done in Syncsort
via the OUTREC control card.  You could also
do this via IEBGENER, though it's a little more
awkward, or it's a natural for Easytrieve, if
you have that.

--
Ron
(user ron
in domain spamblocked.com)

Report this thread to moderator Post Follow-up to this message
Old Post
Ron
11-23-04 08:55 AM


Re: COBOL COPYBOOK CONVERTER
Alistair Maclean wrote:
> Move corresponding does not explicitly reference the subject fields
> and therefore a program suite which parses the code and extracts
> fields referenced by line will not explicitly pick up on the
> implicitly referenced fields.

That would appear to indicate a shortcoming in the program suite ...


Report this thread to moderator Post Follow-up to this message
Old Post
Esmond Pitt
11-23-04 08:55 AM


Re: COBOL COPYBOOK CONVERTER
..    On  20.11.04
wrote  epc8@juno.com (E P Chandler)
on  /COMP/LANG/COBOL
in  7f64e2ff.0411200747.4b192897@posting.google.com
about  Re: COBOL COPYBOOK CONVERTER


EPC> He certainly is! For some reason I did not think about using MOVE
EPC> CORRESPONDING inrec TO outrec. Other than stupidity, is there some
EPC> reason that I should avoid this construct?

No.


Yours,
Lüko Willms                                     http://www.willms-edv.de
/--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --

Gerade das Gegenteil tun heißt auch nachahmen, es heißt nämlich das Gegentei
l nachahmen. -G.C.Lichtenberg

Report this thread to moderator Post Follow-up to this message
Old Post
Lueko Willms
11-23-04 08:55 AM


Re: COBOL COPYBOOK CONVERTER
On 22-Nov-2004, alistair@ld50macca.demon.co.uk (Alistair Maclean) wrote:
 
>
> Move corresponding does not explicitly reference the subject fields
> and therefore a program suite which parses the code and extracts
> fields referenced by line will not explicitly pick up on the
> implicitly referenced fields.

So the move corresponding works fine.   The cross-referencing fails.

Report this thread to moderator Post Follow-up to this message
Old Post
Howard Brazee
11-23-04 08:55 PM


Re: COBOL COPYBOOK CONVERTER
alistair@ld50macca.demon.co.uk (Alistair Maclean) wrote

> Move corresponding does not explicitly reference the subject fields
> and therefore a program suite which parses the code and extracts
> fields referenced by line will not explicitly pick up on the
> implicitly referenced fields.

Nor would a group move.

Report this thread to moderator Post Follow-up to this message
Old Post
Richard
11-24-04 01:55 AM


Re: COBOL COPYBOOK CONVERTER
E P Chandler wrote:
> FrOsTbYtE <frostbyte@arctic.net> wrote:
>
> 
>
>
> He certainly is! For some reason I did not think about using MOVE
> CORRESPONDING inrec TO outrec. Other than stupidity, is there some
> reason that I should avoid this construct?

For this, no.  For a large program, qualification can get to be a bit
tedious, but it still works.  If "variable not uniquely qualified" is
not at least a minor error on your compiler, and you don't check for it
in your compiles, you can really get yourself messed up.


--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~   /   \  /         ~        Live from Montgomery, AL!       ~
~  /     \/       o  ~                                        ~
~ /      /\   -   |  ~          LXi0007@Netscape.net          ~
~ _____ /  \      |  ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~         I do not read e-mail at the above address           ~
~    Please see website if you wish to contact me privately   ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e    ~
~ h---- r+++ z++++                                            ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~


Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
11-24-04 08:55 AM


Re: COBOL COPYBOOK CONVERTER
Alistair Maclean wrote:
> "Howard Brazee" <howard@brazee.net> wrote in message news:<cnt179$5at$1@pe
abody.colorado.edu>...
> 
>
>
> Move corresponding does not explicitly reference the subject fields
> and therefore a program suite which parses the code and extracts
> fields referenced by line will not explicitly pick up on the
> implicitly referenced fields.

Wouldn't you have the same problem with other group-level items?  i.e.,

01  var1.
12  var1-a  pic x.
12  var1-b  pic x.

01  var2    pic xx.

move var1 to var2.


--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~   /   \  /         ~        Live from Montgomery, AL!       ~
~  /     \/       o  ~                                        ~
~ /      /\   -   |  ~          LXi0007@Netscape.net          ~
~ _____ /  \      |  ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~         I do not read e-mail at the above address           ~
~    Please see website if you wish to contact me privately   ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e    ~
~ h---- r+++ z++++                                            ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~


Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
11-25-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
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:23 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.