to remove space from the amount field.

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
Anant Kumar
Member
Posts: 2
Joined: Tue Jan 20, 2015 2:55 pm

to remove space from the amount field.

Post by Anant Kumar » Tue Jan 20, 2015 3:24 pm

Hi All,

I have an input file which has a field "amount" from the column 25 to 34.
If the amount field is having space, job abends. In that case we have to strip that record and run the job...


Please suggest me something so that this abend can be prevented.
Can i use sort utility and sort the file in ascending order with the sort fields 25 to 30. And check if the particular column is space replace it with zero. Can i achieve this with JCL only.


Thanks.
Anant

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Tue Jan 20, 2015 5:15 pm

How is the bad data getting into your system? If you get that fixed, problem solved.

If you SORT the file, please ensure the original program will work with the data in a new order.

No, you can't do it with JCL only. JCL can't do anything on its own. You need a program. SORT is a program.

Anant Kumar
Member
Posts: 2
Joined: Tue Jan 20, 2015 2:55 pm

Post by Anant Kumar » Tue Jan 20, 2015 5:33 pm

Thanks Collins...

That bad data will come that way only beacause it is coming from an online upstream. And that is not bad data if the amount is zero they leave it blank... we just have to change it to zero.

Yes, i understand that i can not do any thing with using JCL only...
My ques was is there any utility by which i can sort the file and the replace those balnks with zeros. :|
Anant

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others