Hi All,
I am trying to read an input file which has a fixed length of 300 bytes and each field in a record are delimited by "|" pipe symbol. For instance
[u]Input file:[/u]
1|232|this is great|chennai|TN|604023|04/12/2018|12321.00|12312.00|N|this is for testing only|external remarks|0|0|3|Y|N|454.00|454.00
1|1232|this is great-o-great|Pune|MA|604023|04/11/2015|321.00|122.01|Y|this is for testing only|external remarks with comments|0|0|4|Y|N|54.00|14.00
1|8059|this is amazing|banglore|KA|298923|28/04/2013|321.00|662.00|N|this is for testing|external remarks|0|0|5|Y|N|344.00|984.00
1|092334|this is outstanding data|Mumbai|MA|23908043|18/08/2016|23321.00|656262.23|Y|this is for purely for testing only|external remarks|0|0|5|N|Y|323.00|1284.00
1|332|this is super|Pune|MA|6023|06/11/2010|9032.12|1233.01|Y|this is for testing only|comments|0|0|5|Y|N|154.00|124.00
I want to include only specific FIXED columns of each record from the input file say 1st, 2nd, 4th, 5th, 6th,9th, 10th, 13th, 14th, 15th in the output file. Is there any option or way to select the records based on the column using the delimiter without fixed length record?
Kindly advice.
Split the input file using delimiter and output only few col
Moderators: Frank Yaeger, Moderator Group
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page