MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Suppression of leading zeros in EASYTRIEVE

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
saraswathi
Beginner


Joined: 08 Dec 2006
Posts: 14
Topics: 8

PostPosted: Tue Apr 29, 2008 1:52 am    Post subject: Suppression of leading zeros in EASYTRIEVE Reply with quote

hi,
i need to suppress the leading zeros using easytrieve.
---------------
Code:

FILE  ATTRIB                                         
  A-Data                1                   5    P   
*
FILE MRGEFILE                                   
   M-Data               1                  9    N
*
JOB INPUT (ATTRIB KEY (A-Data) ) 
     IF EOF ATTRIB               
        STOP                     
     END-IF                       
     M-Data = A-Data             
     PUT MRGEFILE                 
-------------

Above is my code
My input data is
Code:

02468
1357C

The o/p is
Code:

012345678


but desired o/p is 12345678

please help me.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12381
Topics: 75
Location: San Jose

PostPosted: Tue Apr 29, 2008 10:15 am    Post subject: Reply with quote

saraswathi,

Write it as a report and it will automatically suppress the leading zeroes
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Sat May 31, 2008 4:32 pm    Post subject: Reply with quote

to suppress leading zeros u just need to declare the variable number of decimal positions.

for example, declare

Code:
field   w   5   p  0


instead of

Code:
field   w  5  p


easytriev will automatically interpret it as a ''value'' field and will suppress all the leading zeros.

regards.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group