ca.portal.admin

Re:Re: Computed DBKEY from a SQL Table Procedure

Discussion created by ca.portal.admin on Jun 26, 2007
Joe,

This is only happening on dbkeys with very high page
numbers. Right? When the page number is greater than
8,388,607 (x'7fffff'), the high order bit in the dbkey
is on, so it is a negative number.

Rich Kurzawski
--- ""Cates, Joe"" <Joe_Cates@MCPSMD.ORG> wrote:
I have written a number of COBOL Table Procedures
over the past several
years to help with data migration to a relational
database. These Table
Procedures use EDBC and have performed well. There
is now a need to
include the DBKEY, in a decimal format, as an
additional column. There
is an unusual situation with the computed key in
that the page number is
correct but the line isn't. For example, a DBKEY
that should compute to
page 1234 and line 56 gives 1234 for the page and
944 for the line. Line
57 computes to 943, 58 to 942 etc. The work around
is to subtract the
line number from 1000 to get the correct result. I
have an open issue
with CA and was given some instructions to create a
version of CEEUOPT
and link it with my program to allow for TRAP=OFF.
The program was
altered to do a zero divide to cause an ABEND. The
job is to run locally
to produce a SYSMDUMP. The systems programmer
followed those
instructions but we are unable to produce the
required dump. The other
frustrating situation is we are unable to get the
CEEUOPT to resolve via
an INCLUDE. Any suggestions??



Thanks,



Joe S Cates, Database Analyst II

Systems Architecture and Operations
Database Management/Unix Administration

Montgomery County Public Schools

Rockville, MD 20850

301-279-3697

joe_cates@mcpsmd.org






________________________________________________________________________
____________Ready for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/
"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
important thought (at least I think so) on EXTEND SPACE
"this may be obvious, but it didn't originally occur to me (luckily i have
never been burnt on this)

if you EXTEND an area that is updated by 1 CV and read by others - NEWCOPY
the DMCL of the READ-ONLY CVs first .. why?

if would be bad news if immediately after newcopying the update CV dmcl,
records were written to the extended area, yet transactions on the
read-only CV that might be looking for a specific record (or for all) might
not be able to find what should be rightfully accessible - but no read-only
CV will ever complain about having a extended space newcopied in to which
no one could put data ....

this may mean nothing to anyone, but I have added to our in-house
procedures for EXTEND SPACE ...

Chris Hoelscher
Senior IDMS & DB2 Database Administrator
Humana Inc
502-476-2538
choelscher@humana.com



The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information.
"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: Computed DBKEY from a SQL Table Procedure
"Cal Domingue at CA tech support found the sample code related to another
client's similar problem from a while back. He says it's the way LE
COBOL works with moves between COMP and character fields that causes
differing results. If you implement this code it should not be necessary
to use the TRUNC(BIN) option on your compile.

I tried this in one of my table procedures and it appears to work OK.
Thanks to all who replied with their suggestions.

01 WS-MISC.
05 WS-THE-DB-KEY-TO-CONVERT.
10 WS-THE-PAGE-YOU-WANT PIC X(03).
10 WS-THE-LINE-YOU-WANT PIC X(01).
05 WS-THE-BINARY-PAGE PIC S9(08) COMP SYNC VALUE 0.
05 FILLER REDEFINES WS-THE-BINARY-PAGE.
10 FILLER PIC X(01).
10 WS-THE-CONVERTED-PAGE PIC X(03).
05 WS-THE-BINARY-LINE PIC S9(04) COMP SYNC VALUE 0.
05 FILLER REDEFINES WS-THE-BINARY-LINE.
10 FILLER PIC X(01).
10 WS-THE-CONVERTED-LINE PIC X(01).
05 WS-DECIMAL-PAGE-NBR PIC 9(08) VALUE 0.
05 WS-DECIMAL-LINE-NBR PIC 9(02) VALUE 0.

..................

ACCEPT WS-THE-DB-KEY-TO-CONVERT FROM TBLDTL CURRENCY.
MOVE WS-THE-PAGE-YOU-WANT TO WS-THE-CONVERTED-PAGE.
MOVE WS-THE-LINE-YOU-WANT TO WS-THE-CONVERTED-LINE.
MOVE WS-THE-BINARY-PAGE TO WS-DECIMAL-PAGE-NBR.
MOVE WS-THE-BINARY-LINE TO WS-DECIMAL-LINE-NBR.

Outcomes