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

Microfocus COBOL question: MOVE 'N' TO DCLININV-CSR-OPEN.
What does it means in Microfocus COBOL for the following line?
MOVE 'N' TO DCLININV-CSR-OPEN.

Where is the identifier DCLININV-CSR-OPEN defined? If in a compiler added
copybook, what's its name?

Thanks in advance.

Thomas Li



Report this thread to moderator Post Follow-up to this message
Old Post
Thomas A. Li
06-15-04 01:55 AM


Re: Microfocus COBOL question: MOVE 'N' TO DCLININV-CSR-OPEN.
On Mon, 14 Jun 2004 18:22:35 GMT, "Thomas A. Li" <tli@corporola.com>
wrote:

>What does it means in Microfocus COBOL for the following line?
>           MOVE 'N' TO DCLININV-CSR-OPEN.
>
>Where is the identifier DCLININV-CSR-OPEN defined? If in a compiler added
>copybook, what's its name?
>
>Thanks in advance.
>
>Thomas Li
>
Although this smells a lot like homework, I am going to give you some
hints.

Variables can be defined anywere on the Data Division.
This means any of their sections, and includes any copybook referenced
within this division.

If you don't know where it is defined either compile the program and
look at the listing.

Alternatively search your source objects for that string. How you do
this will depend on your OS.



Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com

Report this thread to moderator Post Follow-up to this message
Old Post
Frederico Fonseca
06-15-04 01:55 AM


Re: Microfocus COBOL question: MOVE 'N' TO DCLININV-CSR-OPEN.
I'm sure it is a kind of Microfocus or SQL specific identifier and it is not
user defined in data division. I'm translating an application in Microfocus
COBOL into Java. I have searched all the files available but I can't find
the definition of this kind of variables. There are hundreds of them used.
Maybe it is for cursor control in embedded SQL. Look at the following piece
of code:
IF DCLININV-CSR-OPEN NOT = 'CF0'
EXEC SQL
CLOSE DCLININV_CF0_CSR
END-EXEC
EXEC SQL
OPEN DCLININV_CF0_CSR
END-EXEC
...
END-IF.

But  DCLININV-CSR-OPEN has never occured in a DECLARE CURSOR command.
Bu there ia a similar one called:      05   DB-DCLININV-CSR-OPEN   PIC
X(003) VALUE 'N'. Is there any relation between these two identifiers?

Thanks a lot.

Thomas Li

"Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message
 news:8orrc0tv8doma5qk9naeoubm56e57t6nft@
4ax.com...
> On Mon, 14 Jun 2004 18:22:35 GMT, "Thomas A. Li" <tli@corporola.com>
> wrote:
> 
> Although this smells a lot like homework, I am going to give you some
> hints.
>
> Variables can be defined anywere on the Data Division.
> This means any of their sections, and includes any copybook referenced
> within this division.
>
> If you don't know where it is defined either compile the program and
> look at the listing.
>
> Alternatively search your source objects for that string. How you do
> this will depend on your OS.
>
>
>
> Frederico Fonseca
> ema il: frederico_fonseca at syssoft-int.com



Report this thread to moderator Post Follow-up to this message
Old Post
Thomas A. Li
06-15-04 01:55 AM


Re: Microfocus COBOL question: MOVE 'N' TO DCLININV-CSR-OPEN.
On Mon, 14 Jun 2004 21:16:27 GMT, "Thomas A. Li" <tli@corporola.com>
wrote:

Top posting corrected.

>"Frederico Fonseca" <real-email-in-msg-spam@email.com> wrote in message
> news:8orrc0tv8doma5qk9naeoubm56e57t6nft@
4ax.com... 
>
>I'm sure it is a kind of Microfocus or SQL specific identifier and it is no
t
>user defined in data division. I'm translating an application in Microfocus
>COBOL into Java. I have searched all the files available but I can't find
>the definition of this kind of variables. There are hundreds of them used.
>Maybe it is for cursor control in embedded SQL. Look at the following piece
>of code:
>         IF DCLININV-CSR-OPEN NOT = 'CF0'
>               EXEC SQL
>                   CLOSE DCLININV_CF0_CSR
>               END-EXEC
>               EXEC SQL
>                   OPEN DCLININV_CF0_CSR
>               END-EXEC
>               ....
>           END-IF.
>
>But  DCLININV-CSR-OPEN has never occured in a DECLARE CURSOR command.
>Bu there ia a similar one called:      05   DB-DCLININV-CSR-OPEN   PIC
>X(003) VALUE 'N'. Is there any relation between these two identifiers?

maybe..

In order for you to determine this you will need to precompile the
program. This will create an expanded source, where all your "exec sql
... end-exec" will be converted to another set of COBOL instructions,
and the "declare" variables will also be added/converted according to
the needs of your exec's.

By the name of the variable I agree with you. I think this is a cursor
declaration, and it may not be straightforward to convert to Java.
Can't help you here.



Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com

Report this thread to moderator Post Follow-up to this message
Old Post
Frederico Fonseca
06-15-04 01:55 AM


Re: Microfocus COBOL question: MOVE 'N' TO DCLININV-CSR-OPEN.
Thomas A. Li wrote:
>  I'm translating an application
> in Microfocus COBOL into Java.

Is nothing sacred?

Mark my words, they day will come when they attempt to translate King's "I
have a dream" speech, the Pledge of Allegiance (with or without "under
God"), and the microwave instructions for a frozen pot pie.

COBOL to Java is like Howard Hughes' project of building a wooden airplane;
it probably can be done, but why?

The only reason I can think of is the original COBOL program did something
weird, like supervised a toaster or monitored the tire-pressure in a
go-cart.

At a minimum, a project such as this violates the first rule of programming:
If it's working, leave-it-the-hell-alone!



Report this thread to moderator Post Follow-up to this message
Old Post
JerryMouse
06-15-04 01:55 AM


Re: Microfocus COBOL question: MOVE 'N' TO DCLININV-CSR-OPEN.
JerryMouse wrote:
> Thomas A. Li wrote:
> 
>
> At a minimum, a project such as this violates the first rule of programmin
g:
> If it's working, leave-it-the-hell-alone!

But it supports the rule "If you market a COBOL-to-Java product, and a
potential client has given you a program your translator can't handle,
you need to make it work (and fast) so you don't lose them, which may
negatively impact your paycheck."  :)


--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~   /   \  /         ~        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   ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~


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


Re: Microfocus COBOL question: MOVE 'N' TO DCLININV-CSR-OPEN.
LX-i wrote:
> JerryMouse wrote: 
>
> But it supports the rule "If you market a COBOL-to-Java product, and a
> potential client has given you a program your translator can't handle,
> you need to make it work (and fast) so you don't lose them, which may
> negatively impact your paycheck."  :)

Which generates another axiom: It's hard to market a solution for a problem
that....

"Negatively impact?"



Report this thread to moderator Post Follow-up to this message
Old Post
JerryMouse
06-27-04 08:55 PM


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 08:24 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.