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 

How to convert PIC S9(3) comp-3 to charcter format.

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


Joined: 21 Oct 2005
Posts: 26
Topics: 15

PostPosted: Tue Nov 07, 2006 2:11 am    Post subject: How to convert PIC S9(3) comp-3 to charcter format. Reply with quote

Could some one please explain how to include a logic in COBOL program to convert PIC S9(3) COMP-3 field to X(?) charcter format.
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


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

PostPosted: Tue Nov 07, 2006 6:16 am    Post subject: Reply with quote

field-a pic s9(3) comp-3

field-b pic s9(3) trailing

field-c redefines field-b
field-d pic x(3)
field-e pic x(1).

move field-a to field-b
field-d contains numeric integers in alpha-numeric field.
field-e contains the sign
field-c contains contains the numeric integers and the sign in a pic x(4).
_________________
Dick Brenholtz
American living in Varel, Germany
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:46 am    Post subject: Reply with quote

field-a pic s9(3) comp-3

field-b pic s9(3) trailing separate

field-c redefines field-b
field-d pic x(3)
field-e pic x(1).

move field-a to field-b
field-d contains numeric integers in alpha-numeric field.
field-e contains the sign
field-c contains contains the numeric integers and the sign in a pic x(4).

funny, 4 years and no one has caught this. separate needs tobe included in the usage clause
_________________
Dick Brenholtz
American living in Varel, Germany
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