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
 
Zero supression using FA

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: Zero supression using FA
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    Post subject: Reply to: Zero supression using FA
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Supression of spaces in html email vanakar All Other Mainframe Topics 6 Thu Feb 17, 2011 8:50 pm
No new posts supression of zeroes satish kanamarlapudi COBOL Programming 4 Wed Dec 31, 2008 1:10 pm
No new posts Convert from Zero supression format t... ESSPRABHU DFSORT/ICETOOL 5 Fri May 18, 2007 8:39 pm
No new posts Supression of system messags chennareddy CLIST & REXX 1 Tue Mar 21, 2006 10:42 am

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