Re: COBOL/DB2 Date edit question
- From: Graham Hobbs <ghobbs@xxxxxxxxxxx>
- Date: Sun, 12 Aug 2007 17:47:01 -0400
I hear what you say Michael. Might I scenario something (and if you
get bored with the subject I will understand) ..
My 'almost all common data types DB2 table' has 14 columns, one is a
key and in particular, three of the others are DB2 datatypes DATE,
TIME, TIMESTAMP. I populate the CICS screen from this table, any field
may be user changed, I need to edit all changes before they go back
into the table - typical CICS scenario.
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)
4) some other way??
5) there is no especially favoured method.
But being out of the workforce for a few years now, on my laptop with
older IBM Cobol, CICS, DB2 and btrieve VSAM software, developing a
software package (I am one of these BT/I's), am looking for help as to
how modern installations might handle DATE, TIME, TIMESTAMP edits.
You've already given me clues. Other insights?
Anyway, thanks to date.
graham
On Sun, 12 Aug 2007 14:17:41 GMT, "Michael Mattias"
<mmattias@xxxxxxxxxxxxxx> wrote:
"Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5i8ehiF3lkrtaU1@xxxxxxxxxxxxxxxxxxxxx
"Graham Hobbs" <ghobbs@xxxxxxxxxxx> wrote in message
MP!ZADATEI is a field on a CICS screen, populated from a column in a
row from a DB2 table. The user changes it and now it needs editing
Your EXEC SQL may yet be a winner, just give it a host variable... :-).
Isn't using EXEC SQL .... END-EXEC kind of an obtuse way to validate a date
entered upon the screen?
Not that it can't be made to work, but generally you'd have some kind of
library routine around to handle that.
Besides, at some point it's possible (probable?) you are going to have to
reformat it anyway to do the UPDATE
MCM
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: COBOL/DB2 Date edit question
- From: Pete Dashwood
- 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
- COBOL/DB2 Date edit question
- Prev by Date: Re: Actual COBOL in Commodore 64
- Next by Date: Re: COBOL/DB2 Date edit question
- Previous by thread: Re: COBOL/DB2 Date edit question
- Next by thread: Re: COBOL/DB2 Date edit question
- Index(es):
Relevant Pages
|