HP3000-L Archives

May 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Lance Costanzo <[log in to unmask]>
Reply To:
Lance Costanzo <[log in to unmask]>
Date:
Wed, 7 May 1997 08:57:58 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
good syntax, randy, but there's a catch.
you won't get accurate results in cobol for any jcw +/- 9999

>   WORKING-STORAGE SECTION.
>   77 JCW-VALUE         PIC S9(4) COMP.
>   77 JCW-STATUS        PIC S9(4) COMP.
>   77 JCW-NAME          PIC X(32) VALUE SPACES.
>   MOVE "MAIL " TO JCW-NAME.
>   CALL INTRINSIC "FINDJCW" USING JCW-NAME, JCW-VALUE, JCW-STATUS.
>p.s. If my COBOL syntax isn't perfect, it's only been 14 years since I
>last touched it.

to access the full range of any 16-bit value:

01 jcw-value1            pic s9(4) comp.
01 jcw-value1x           pic xx redefines jcw-value1.

01 jcw-value             pic s9(9) comp value zero.
01 jcw-value-r           redefines jcw-value.
   03 filler             pic xx.
   03 jcw-valuex         pic xx.

   call "findjcw" using jcw-name, jcw-value1, jcw-status.
   move jcw-value1x to jcw-valuex.

there's probably some easy way to do it in cobol-85, but this works even in
cobol-68.

lance.

ATOM RSS1 RSS2