View previous topic :: View next topic |
Author |
Message |
psmadhusudhan Beginner

Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Fri Oct 29, 2010 7:27 am Post subject: Comp-3 to alphanumeric conversion |
|
|
Hi.
I have tried Comp-3 to alphanumeric conversion using the example provided in the following post.
http://www.mvsforums.com/helpboards/viewtopic.php?t=7455&highlight=alphanumeric++comp3
but I could get exact results as what I expected.
Following is the working storage declaration
Code: | 03 WW-EX-CUST-NUM PIC S9(18) TRAILING.
03 WW-EX-CUST-NUM3 REDEFINES WW-EX-CUST-NUM.
05 WW-EX-CUST-NUM2 PIC X(18).
05 FILLER PIC X(1). |
Following is my moving logic
MOVE IP106-ADDR-ROPL-ID-NUM TO WW-EX-CUST-NUM
DISPLAY "WW-EX-CUST-NUM3: " WW-EX-CUST-NUM3
The value in IP106-ADDR-ROPL-ID-NUM is
Code: | <-N-+----1----+--->
1103000001 |
the value displayed is spool is
Code: | WW-EX-CUST-NUM3: 00000000110300000A |
The '1' present in last byte is getting converted to 'A'.
Please let me know how can I achieve following result.
Code: | WW-EX-CUST-NUM3: 000000001103000001 |
_________________ Thanks
Madhu Sudhan |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Oct 29, 2010 9:47 am Post subject: |
|
|
Madhu Sudhan,
my apologies. Trailing should be Trailing Separate.
i provided the incorrect usage clause,
and after 4 years you found the bug.
again, sorry, good example of not testing my own solution.
dbz _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
psmadhusudhan Beginner

Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Sun Oct 31, 2010 2:33 am Post subject: |
|
|
Thanks Dick. It is working now.  _________________ Thanks
Madhu Sudhan |
|
Back to top |
|
 |
|
|