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
 
Avoiding Zero padding

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Avoiding Zero padding
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    Post subject: Re: Avoiding Zero padding
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Avoiding Zero padding
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    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 Padding with variable number of SPACE... cybertaurean SYNCSORT 7 Wed Oct 28, 2015 11:22 pm
No new posts Padding Zeroes while Conversion HameedAli DFSORT/ICETOOL 14 Sat Jul 07, 2012 8:19 pm
No new posts PARSE with Padding Leading SPACES by ... puneetvirmani143 DFSORT/ICETOOL 1 Fri Mar 23, 2012 4:03 pm
No new posts Padding to packed decimal field using... rajendraa DFSORT/ICETOOL 2 Tue May 10, 2011 11:02 pm
No new posts Padding one Field to another File HameedAli DFSORT/ICETOOL 2 Tue Feb 22, 2011 3:29 pm

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