View previous topic :: View next topic
|
Author |
Message |
viji_rags
New User
Joined: 04 Jun 2010 Posts: 24 Location: chennai
|
|
|
|
how to move spaces to a numeric data-item. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
so that You might get an abend later on ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you can not do it directly.
MOVE SPACES TO NUM-DATA-ITEM
will generate a compiler error.
but,
I will tell you how, when you tell me why do you want to do that. |
|
Back to top |
|
|
viji_rags
New User
Joined: 04 Jun 2010 Posts: 24 Location: chennai
|
|
|
|
I need these to be done in a program...how can i achieve this.. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
viji_rags wrote: |
I need these to be done in a program...how can i achieve this.. |
no, that is not a good reason. why does it need to be done in a program. |
|
Back to top |
|
|
viji_rags
New User
Joined: 04 Jun 2010 Posts: 24 Location: chennai
|
|
|
|
Can i move null-values to numeric data-item |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
obviously this is based on your other question about moving spaces to a numeric data-item.
what is your understanding of the verbiage null-values?
null-values is a non-word - only exists in your mind. |
|
Back to top |
|
|
viji_rags
New User
Joined: 04 Jun 2010 Posts: 24 Location: chennai
|
|
|
|
i need to move spaces into a numeric data item and write into a file.. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
This is gonna be a long conversation between Dick and the TS. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Exactly what do you want to do.
Do you want to blank out some fields in an existing file or do you want to create a file with certain fields blanked out.
But then why would you want to do that |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I pre assume that we are talking about COBOL - if yes, please show the definition of your numeric field and what do you want in that field once "the process you've described so far" is over. It will help us to help you. While showing the valuse, please use HEX values. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
The BLANK WHEN ZERO clause or Reference Modification can be used.
However, just because you can doesn't mean that you should.
But, that's your decision....
Bill |
|
Back to top |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
Either REDEFINE the field with a PIC X clause and move spaces to that field OR place the numeric field under a GROUP LEVEL item and move spaces to that GROUP LEVEL item |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
ridgewalker58 wrote: |
Either REDEFINE the field with a PIC X clause and move spaces to that field OR place the numeric field under a GROUP LEVEL item and move spaces to that GROUP LEVEL item |
ah! another 'learning moment' lost. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
I agree with Dick.
This one looked like it had a chance to get OP to (1) answer the WHY question, and (2) try his basic COBOL skills. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I need these to be done in a program...how can i achieve this.. |
Why do you believe you need to corrupt some numeric value?
There are many of us who believe you do not. . . How will this corrupt value be used when it is input?
While there is a BLANK WHEN ZERO it is most often used so that there won't be lots of zeros on some user-readable output. It is not usually used for data files. . .
As was mentoned earlier, you have some reluctance about explaining what you are actually trying to accomplish. . . If you do explain, you may recieve replies that are more useful to your task at hand. |
|
Back to top |
|
|
|