Subject: | |
From: | |
Reply To: | |
Date: | Wed, 7 May 1997 08:57:58 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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.
|
|
|