Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Leading spaces suppression

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

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Wed Oct 14, 2009 4:03 pm    Post subject: Leading spaces suppression
Reply with quote

Hi

Just like Z is used for leading zero suppression , what should be used for leading space suppression.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8167
Location: East Dubuque, Illinois, USA

PostPosted: Wed Oct 14, 2009 4:33 pm    Post subject:
Reply with quote

I do not understand what you mean by "leading space suppression". Do you mean the field should be left-justified? Leading spaces cannot be suppressed -- there has to be spaces, LOW-VALUES, or something in the character position.

You need to provide more details -- the variable picture and exactly what you want the variable output to look like.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Wed Oct 14, 2009 7:12 pm    Post subject: Reply to: Leading spaces suppression
Reply with quote

You can define (for example) an edit-field as PIC BBBBBBBBBX. In this example, if the value were right-justified (padded with high-order SPACES) with a low-order 'A', then the edit-field would equal 'bbbbbbbbbA', with each 'b' representing a BLANK/SPACE.

However, if the value is left-justified padded with low-order SPACES, then review the Intrinsic Function REVERSE, used together with the INSPECT verb.

This combination has been discussed on the board before.

Intrinsic Functions were introduced with COBOL/370, about 15-18 years ago.

Bill
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1244
Location: Israel

PostPosted: Thu Oct 15, 2009 2:49 am    Post subject: Re: Leading spaces suppression
Reply with quote

Ambili S wrote:
Just like Z is used for leading zero suppression , what should be used for leading space suppression.
The leading zeroes are not just suppressed, they are replaced by spaces.
Do you want to replace your leading spaces with something else ?
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 Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us