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

Zero supression using FA


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Zain

New User


Joined: 29 Aug 2007
Posts: 3
Location: Chennai

PostPosted: Thu Mar 06, 2008 4:36 pm
Reply with quote

Can we supress the leading zeroes usinf FILE-AID....I know this can be done using SORT utility ...but please let me know how we can chieve it using the FILE-AID... control card will help ..
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Fri Mar 07, 2008 12:02 am
Reply with quote

While you may used the REPL or EDIT options to change fields, there are no options in batch FILEAID to suppress zeroes.

If you had records such as these with a numeric field in position 5.

Code:

ABCD0000000000DEFG
ABCD0000000123DEFG
ABCE0000033343DEFH
ABCF0000897653DEFI
ABCF0333397653DEFI


You could use a FILEAID setup like this to suppress the zeroes:

Code:

//FILEAID EXEC PGM=FILEAID                                   
//SYSPRINT DD  SYSOUT=*                                     
//DD01     DD *                                             
ABCD0000000000DEFG                                           
ABCD0000000123DEFG                                           
ABCE0000033343DEFH                                           
ABCF0000897653DEFI                                           
ABCF0333397653DEFI                                           
//DD01O    DD DSN=HLQ.OUTPUT,                               
//            UNIT=SYSDA,DISP=(NEW,CATLG),                   
//            RECFM=FB,LRECL=80,BLKSIZE=27920,               
//            SPACE=(TRK,(1,1),RLSE)                         
$$DD01 CA REPL=(5,EQ,C'0000000000',C'          '), 
          REPL=(5,EQ,C'000000000',C'         '),   
          REPL=(5,EQ,C'00000000',C'        '),     
          REPL=(5,EQ,C'0000000',C'       '),       
          REPL=(5,EQ,C'000000',C'      '),         
          REPL=(5,EQ,C'00000',C'     '),           
          REPL=(5,EQ,C'0000',C'    '),             
          REPL=(5,EQ,C'000',C'   '),               
          REPL=(5,EQ,C'00',C'  '),                 
          REPL=(5,EQ,C'0',C' ')                     
/*                                                 
 


Your OUTPUT file would look like:

Code:

ABCD          DEFG     
ABCD       123DEFG     
ABCE     33343DEFH     
ABCF    897653DEFI     
ABCF 333397653DEFI     


If you want to update the file in place, you can delete the DD01O DD statement and use UPDATE parameter rather than CA (copyall) in your control cards.
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 -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Supression of spaces in html email All Other Mainframe Topics 6
No new posts supression of zeroes COBOL Programming 4
No new posts Convert from Zero supression format t... DFSORT/ICETOOL 5
No new posts Supression of system messags CLIST & REXX 1
Search our Forums:

Back to Top