Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Move spaces to a numeric data-item

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
viji_rags

New User


Joined: 04 Jun 2010
Posts: 24
Location: chennai

PostPosted: Wed Jul 07, 2010 2:38 pm    Post subject: Move spaces to a numeric data-item
Reply with quote

how to move spaces to a numeric data-item.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Jul 07, 2010 2:40 pm    Post subject: Reply to: move statement
Reply with quote

so that You might get an abend later on ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 07, 2010 2:42 pm    Post subject:
Reply with quote

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

New User


Joined: 04 Jun 2010
Posts: 24
Location: chennai

PostPosted: Wed Jul 07, 2010 2:46 pm    Post subject: Reply to: move statement
Reply with quote

I need these to be done in a program...how can i achieve this..
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 07, 2010 2:50 pm    Post subject: Re: Reply to: move statement
Reply with quote

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

New User


Joined: 04 Jun 2010
Posts: 24
Location: chennai

PostPosted: Wed Jul 07, 2010 2:50 pm    Post subject: null values
Reply with quote

Can i move null-values to numeric data-item
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 07, 2010 2:52 pm    Post subject:
Reply with quote

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

New User


Joined: 04 Jun 2010
Posts: 24
Location: chennai

PostPosted: Wed Jul 07, 2010 2:55 pm    Post subject: move statement
Reply with quote

i need to move spaces into a numeric data item and write into a file..
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed Jul 07, 2010 2:58 pm    Post subject:
Reply with quote

This is gonna be a long conversation between Dick and the TS.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jul 07, 2010 3:01 pm    Post subject:
Reply with quote

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 icon_confused.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Jul 07, 2010 4:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jul 07, 2010 7:00 pm    Post subject: Reply to: move statement
Reply with quote

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

New User


Joined: 26 Sep 2008
Posts: 51
Location: New York

PostPosted: Wed Jul 07, 2010 8:11 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 07, 2010 8:26 pm    Post subject:
Reply with quote

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

Active Member


Joined: 31 Oct 2006
Posts: 961
Location: Richmond, Virginia

PostPosted: Wed Jul 07, 2010 8:45 pm    Post subject:
Reply with quote

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jul 07, 2010 8:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us