Re: Oracle Indicator Variables
From: Thane Hubbell (thaneh_at_softwaresimple.com)
Date: 12/15/03
- Previous message: Peter E.C. Dashwood: "Re: The IBM box (was: Re: How do they do it? (was" Re: MVS Packed"
- In reply to: Dan: "Re: Oracle Indicator Variables"
- Next in thread: Dan: "Re: Oracle Indicator Variables"
- Reply: Dan: "Re: Oracle Indicator Variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Dec 2003 15:34:11 -0800
Using DEC VMS COBOL and the Oracle PRO*COBOL precompiler we ended up
making sure to use RTRIM on both sides of the select - this reduced
our headaches considerably.
"Dan" <deacondan25@N.O.S.P.A.M.hotmail.com> wrote in message news:<vtp4avd35tige1@corp.supernews.com>...
> "Johan den Boer" <me@knoware.nl> wrote in message
> news:vtjrs0ivj43r9b@corp.supernews.com...
> > Hi,
> >
> > Make sure you have the -CIBMCOMP switch turned on. Picture clause for
> > indicator variabled have to be comp sync.
> >
> > jdb
> >
> >
> > "Dan" <deacondan25@N.O.S.P.A.M.hotmail.com> schreef in bericht
> > news:vtiq35klktdjc4@corp.supernews.com...
> > > We're switching from Compaq Cobol to Microfocus Cobol and are having
> trouble
> > > with indicator variables. When doing selects, the query doesn't always
> > > return the correct results, and when doing updates, we receive date and
> > > number errors.
> > >
> > > The programs and variables work correctly under the Compaq Cobol and
> have
> > > for several years. Executing the same queries in SQL/Plus or TOAD will
> also
> > > return the correct results.
> > >
> > > Does anyone have any suggestions as to what is causing this and how we
> can
> > > correct it?
> > >
> > > Thanks,
> > > Dan
> > >
>
> -C IBMCOMP is the default.
>
> The Procobol requires the COMP however, the MicroFocus Cobol doesn't seem to
> work without COMP-5. I haven't looked it up, so I'm not sure of the
> difference. We were able to get this to work by adding "MAKESYN COMP-5 ==
> COMP" to the compile script.
>
> The major issue with the invalid dates and numbers on the inserts is not on
> the insert itself but on the data coming from the input file used to
> performthe initial selects. It appears that the original
> pre-compiler/compiler would trim the data before using it in a select. The
> current version defaults do not.This also caused an issue with inserting the
> data. By not trimming the data on the insert, attempting to insert "MILLER"
> into LAST_NAME varchar2(30) the length of the data would be 30 instead of 7.
> This will mess up a lot of queries.
>
> To fix this I added the pre-compiler directive PICX=VARCHAR2 to the script.
> Otherwise, I would have had to redefine each element into a length element
> and a array/variable element. This would not make a lot of people happy,
> since the changes need to be made before Jan 1.
>
> This appears to take care of the issue since the program is retrieving valid
> data on the selects and it appears to propagate through the program
> correctly and we haven't had any more issues with bad dates or invalid
> numbers.
>
> I'll be turning this over Monday for others to verify the changes and
> testing results work in other programs.
>
> Are there any other things that I should take into consideration with this
> switch from Oracle 8i to 9i and the change from Compaq Cobol to MicroFocus
> Cobol?
>
> Thanks,
> Dan
- Previous message: Peter E.C. Dashwood: "Re: The IBM box (was: Re: How do they do it? (was" Re: MVS Packed"
- In reply to: Dan: "Re: Oracle Indicator Variables"
- Next in thread: Dan: "Re: Oracle Indicator Variables"
- Reply: Dan: "Re: Oracle Indicator Variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|