Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Replace leading zeroes with blanks

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Tue Sep 26, 2006 9:05 pm    Post subject: Replace leading zeroes with blanks
Reply with quote

Hi,

I need to repalce leading zeroes with blanks..I cannot find a EDIT MASK that does this...

Input

Code:
----+----1----+----2----+----3--
********************************
00011000106477301




Column 01 replace leading zeores (lenght 15)

Thanks
Back to top
View user's profile Send private message

yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Tue Sep 26, 2006 9:07 pm    Post subject: Re: Replace leading zeroes with blanks
Reply with quote

Oh yeah the leading zeroes vary..

Code:
00011000106477301
00011000115214901
00001000116593501
01000166716789901
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Sep 26, 2006 9:12 pm    Post subject:
Reply with quote

Hi yianis,

U can declare another variable
05 WS-MASK-VAR PIC Z(14)9(1).

Move ur variable to WS-MASK-VAR.Display it.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Sep 26, 2006 9:14 pm    Post subject:
Reply with quote

Hi yianis,

I provide the solution for cobol. In case if u want to use it sort I will come back to u.
Back to top
View user's profile Send private message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Tue Sep 26, 2006 9:24 pm    Post subject:
Reply with quote

Thanks,

I think all I have to do is
OUTREC BUILD=(1,08,
09,16,ZD,EDIT=(IIIIIIIIIIIIIIII),
25,24)

This is my real example... I have a field in position 09 for a length of 16. This field contains spaces in front of it too.

Sample Data:



This seems to work...

Code:
----+----1----+----2----+----3----+----4----+---
00082286       80272373107906002         0014419
00082286     0880272370107906002         0014419
00082286     0880051260107906002         0014427
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Sep 26, 2006 10:19 pm    Post subject:
Reply with quote

DFSORT's M10 edit mask will do that. For example:

Code:

//S1    EXEC  PGM=ICEMAN                               
//SYSOUT    DD  SYSOUT=*                               
//SORTIN DD *                                           
00011000106477301                                       
00011000115214901                                       
00001000116593501                                       
01000166716789901                                       
//SORTOUT DD SYSOUT=*                                   
//SYSIN    DD    *                                     
  OPTION COPY                                           
  INREC OVERLAY=(1:1,17,ZD,M10,LENGTH=17) 
/*             
Back to top
View user's profile Send private message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Tue Sep 26, 2006 10:59 pm    Post subject:
Reply with quote

Thanks Frank !
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us