IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Leading spaces suppression


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Oct 14, 2009 4:33 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 14, 2009 7:12 pm
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: 1353
Location: Israel

PostPosted: Thu Oct 15, 2009 2:49 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
Search our Forums:

Back to Top