Re: COBOL/DB2 Date edit question
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 13 Aug 2007 12:22:31 +1200
--
"I used to write COBOL...now I can do anything."
"LX-i" <lxi0007@xxxxxxxxxxxx> wrote in message
news:9NydnexmCdlzDSLbnZ2dnUVZ_rGrnZ2d@xxxxxxxxxxxxxx
Graham Hobbs wrote:
My problem is to find the easiest/clearest way to edit these three
data types before update occurs. I suspect three ways are available:
1) my 'neat?' EXEC SQL.'s.
2) inline code like 'if month < 00 or >12 then error, etc'.
3) exec cics link 'editdate' with suitable commarea (and othe pgms for
TIME and TIMESTAMP) and test a return code. (your library routine)
I can vouch for option 2 being very, very efficient. We had a copybook
that did date manipulation and validation. It was 3,000+ lines, and I was
just sure that it could be made much, much more efficient.
Well, when we had some analysis done on our source code, the results came
out with the paragraphs sorted from longest run time to shortest run time.
For every program, the date/time routine's paragraphs filled the bottom of
each list!
I had been working on a "convert" paragraph to convert time zones, using
the database. After we got those results, I abandoned that. :)
I think that's a pity, Daniel. If the date validation had been revised, and
stored as a db stored procedure you may have found very different results
from your analysis. All of the date validation would have "disappeared" for
a start... :-))
Never mind. You found a good solution; that's what really matters :-)
Pete.
--
"I used to write COBOL...now I can do anything."
.
- Follow-Ups:
- Re: COBOL/DB2 Date edit question
- From: LX-i
- Re: COBOL/DB2 Date edit question
- References:
- COBOL/DB2 Date edit question
- From: Graham Hobbs
- Re: COBOL/DB2 Date edit question
- From: Pete Dashwood
- Re: COBOL/DB2 Date edit question
- From: Graham Hobbs
- Re: COBOL/DB2 Date edit question
- From: Pete Dashwood
- Re: COBOL/DB2 Date edit question
- From: Michael Mattias
- Re: COBOL/DB2 Date edit question
- From: Graham Hobbs
- Re: COBOL/DB2 Date edit question
- From: LX-i
- COBOL/DB2 Date edit question
- Prev by Date: Re: COBOL/DB2 Date edit question
- Next by Date: Re: Actual COBOL in Commodore 64
- Previous by thread: Re: COBOL/DB2 Date edit question
- Next by thread: Re: COBOL/DB2 Date edit question
- Index(es):
Relevant Pages
|