View previous topic :: View next topic |
Author |
Message |
vijayakumar8303 Beginner
Joined: 21 Oct 2005 Posts: 26 Topics: 15
|
Posted: Tue Nov 07, 2006 2:11 am Post subject: How to convert PIC S9(3) comp-3 to charcter format. |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Nov 07, 2006 6:16 am Post subject: |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Oct 29, 2010 9:46 am Post subject: |
|
|
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 |
|
 |
|
|