View previous topic :: View next topic
|
Author |
Message |
Marcos_Rodrigues
New User
Joined: 18 Aug 2006 Posts: 5
|
|
|
|
Hi Everyone.
How can i manipulate comma with numbers? i need a logical response.
For example:
I have a field with 8 bytes 9(08) and when someone enters some number
(like 00200000) i need my program changes to XXX,XXXXX
i need to create a table and check number by number and count the decimal ? if someone have a example and can post it to me, i will be happy!
Thx for all. |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
Your question seems straight foreword.
Code: |
01 VAR1 PIC 9(8) VALUE 02000000.
01 VAR2 PIC 9(3),9(5).
MOVE VAR1 to VAR2.
|
Result will be 020,00000
Dave |
|
Back to top |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
Use ZZZ,ZZZZ in the picture clase and more variable to this
For more inforamtion see editable charaters in COBOL |
|
Back to top |
|
|
Marcos_Rodrigues
New User
Joined: 18 Aug 2006 Posts: 5
|
|
|
|
when i do that way (move var1 to var2.) my cobol program is moving ZEROS to var2... and i move 020000 to var1...
did u know why that? |
|
Back to top |
|
|
Marcos_Rodrigues
New User
Joined: 18 Aug 2006 Posts: 5
|
|
|
|
Thx Kgmuraj. |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
Marcos_Rodrigues wrote: |
when i do that way (move var1 to var2.) my cobol program is moving ZEROS to var2... and i move 020000 to var1...
did u know why that? |
Can you please post the working storage / program sections that execute the code you are having the question about?
Thanks,
Dave |
|
Back to top |
|
|
|