MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Comp-3 to alphanumeric conversion

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
psmadhusudhan
Beginner


Joined: 28 Nov 2006
Posts: 143
Topics: 48

PostPosted: Fri Oct 29, 2010 7:27 am    Post subject: Comp-3 to alphanumeric conversion Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Oct 29, 2010 9:47 am    Post subject: Reply with quote

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
View user's profile Send private message
psmadhusudhan
Beginner


Joined: 28 Nov 2006
Posts: 143
Topics: 48

PostPosted: Sun Oct 31, 2010 2:33 am    Post subject: Reply with quote

Thanks Dick. It is working now. Smile
_________________
Thanks
Madhu Sudhan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group