Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageOn 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
Post Follow-up to this messageI'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
Post Follow-up to this messageOn 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
Post Follow-up to this messageThomas 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!
Post Follow-up to this messageJerryMouse 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 ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
Post Follow-up to this messageLX-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?"
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.