ca.portal.admin

Problem in cobol converting dbkey

Discussion created by ca.portal.admin on Apr 7, 2005
Latest reply on Apr 7, 2005 by ca.portal.admin
Hi everyone:

We have an Ads prog that work with this example:

COMPUTE DBKEY-1 = (1047614 * 256) + 1.
OBTAIN TELEFONO DB-KEY IS DBKEY-1.

The decimal value of the dbkey is 268189185. The DBKEY-1 field is s9(8) comp
sync.

If we try to do the same thing in cobol, we have the problem that we can
never fit the decimal value in the s9(8) comp sync, all the time its trunc
the 2 in the left in the decimal field. The only way that we can store this
decimal number in a comp field in cobol its defining it s9(9) comp sync, but
we can´t use it like a dbkey.

Any ideas that how we can proceed in cobol to do that???

TIA.

Javier S.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: Securing IDMS dictionaries
"from what i remember

10.2 type security only secure the access (ie what you could do in idd) - i
do not think it would have had any bearing on a user program that accessed
the dictionary as a database - i think the DB security would be used to
secure the dict database as you would any other database - and then
schema/subschema security like any application subschema security.

chris

"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: Problem in cobol converting dbkey
"Javier,
for cobol programs you can turn on the compiler option TRUNC(BIN) this wil avoid truncation even
if you use s9(8) comp fields.
If you have a cobol compiler like COBOL for MVS or Enterprise cobol and
you don't want to use the TRUNC(BIN) option because of cpu overhead, you can use the s9(8) comp-5 definition.

gr

Peter

Outcomes