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

Avoiding Zero padding


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jpraveenreddy

New User


Joined: 30 Nov 2007
Posts: 28
Location: mysore

PostPosted: Wed Feb 20, 2008 8:26 am
Reply with quote

Hi friends,
When I am moving value into the fields additional zeros are being padded.Can any one suggest me how to avoid zero padding? icon_question.gif
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Feb 20, 2008 8:35 am
Reply with quote

jpraveenreddy wrote:
Hi friends,
When I am moving value into the fields additional zeros are being padded.Can any one suggest me how to avoid zero padding? icon_question.gif


Move to a field that is the same length as the source field. Or move to a numeric edited field with zero suppression.
Back to top
View user's profile Send private message
raghumale

New User


Joined: 21 Feb 2008
Posts: 6
Location: banglore

PostPosted: Fri Feb 22, 2008 12:32 pm
Reply with quote

hi Reddy
maintain both sizes are same.
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Fri Feb 22, 2008 1:11 pm
Reply with quote

Hi praveen

Quote:
When I am moving value into the fields additional zeros are being padded.Can any one suggest me how to avoid zero padding?


In case of numeric data item ie;

Code:
01 A     PIC 9(04).
01 B     PIC 9(02).


lets assume you are having value 12 in B

you are moving

B TO A

Since A is a type of Numeric data item the value always filling from right most side to left..

ie

Code:
A        is              [] [] [] []     4 bytes
                           

B        is              [] []   value 12


when u moved B TO A

it will from right ie

[] [] [] []
0 0 1 2 here left 2 bytes will padded with zero use always EDITING ITEMS

ie Declare

A has

Code:
01 A           PIC ZZZ9


So Zero will be supressed in above case
Back to top
View user's profile Send private message
jpraveenreddy

New User


Joined: 30 Nov 2007
Posts: 28
Location: mysore

PostPosted: Fri Feb 22, 2008 2:46 pm
Reply with quote

Hi All,
Thanx for ur suggetions.

TO Raghu: I did what u said.Now issue is solved.
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 Inefficient BUILD - VB records paddin... SYNCSORT 9
No new posts Padding with variable number of SPACE... SYNCSORT 7
No new posts Padding Zeroes while Conversion DFSORT/ICETOOL 14
No new posts PARSE with Padding Leading SPACES by ... DFSORT/ICETOOL 1
No new posts Padding to packed decimal field using... DFSORT/ICETOOL 2
Search our Forums:

Back to Top