Re: COBOL/DB2 Date edit question



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

.



Relevant Pages

  • Re: Sub Capacity Reporting for non IBM Vendors
    ... The ones for CICS, DB2, and MQ are run though SCRT every month ... SMF89.1 records contain resource usage information. ... If you have received this electronic mail message in error, ...
    (bit.listserv.ibm-main)
  • load modules for CICS, IMS, DB2 and TSO
    ... Rather than posting the same thing to the CICS, IMS and DB2 lists I'm ... libraries for all of my Cobol compiles (batch, batch with IMS, batch ...
    (bit.listserv.ibm-main)
  • Re: COBOL Compiler for Windows
    ... Do the MS and Fujitsu compilers support VSAM KSDS files? ... DB2 access, CICS access, guess I'm asking EXEC CICS suchandsuch and ... Right about a mainframe compiler. ... I semi-expected your comments about CICS and DB2 but what's the ...
    (comp.lang.cobol)
  • Re: Sub Capacity Reporting for non IBM Vendors
    ... and MQ - are not in this list, but they are all producing SMF Type89 ... The ones for CICS, DB2, and MQ are run though SCRT every month ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)