Re: Oracle Indicator Variables

From: Thane Hubbell (thaneh_at_softwaresimple.com)
Date: 12/15/03

  • Next message: Peter E.C. Dashwood: "Re: OT: In defence of the indefensible. WAS: Re: COBOL array editing output"
    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


  • Next message: Peter E.C. Dashwood: "Re: OT: In defence of the indefensible. WAS: Re: COBOL array editing output"

    Relevant Pages

    • Re: Converting numbers to comp fields (Cobol)
      ... Doesn't really matter since COMP is a COBOL thing, ... How COMP format is implemented depends on the specific COBOL compiler. ... The MicroFocus COBOL compiler I have on my box is a 12 year old DOS one. ...
      (microsoft.public.vb.general.discussion)
    • Re: Converting numbers to comp fields (Cobol)
      ... >How COMP format is implemented depends on the specific COBOL compiler. ... >The MicroFocus COBOL compiler I have on my box is a 12 year old DOS one. ...
      (microsoft.public.vb.general.discussion)
    • Re: Newbie Question
      ... but I am not all that familiar with most of cobol. ... Probably depends on your COBOL and various compiler options. ... A PIC 9 comp will probably be stored in a halfword (I don't know how much the ... I very rarely bother responding to challenge/response systems, ...
      (comp.lang.cobol)
    • Re: J4 - presentation/discussion on "Future of the COBOL Standard"
      ... do you find anything invalid with the assertion ... units these fractions are decimal fractions'? ... Cobol doesn't measure US currency in dollars and fractions of a dollar, ... Thrice asked, thrice refused... ...
      (comp.lang.cobol)