You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Read .txt(position based file) to CSV file In OIC.

Accepted answer
125
Views
2
Comments
edited Jun 8, 2022 12:10PM in General Technical Discussions 2 comments

Summary

Receiving Positioned based file from SFTP and need to create CSV file.

Content

Need suggestions on how to read .txt(position based file) file to csv. As of now am taking variables to read each field with substring. but some fields are not getting  correct values.

Ex: txt file line:  30000000000142550028400001000102001393         0000000004120005212020CHKUSDG-4974011

if i use substring (c1, 62,69). i should be getting 5212020' but am getting '05212020CHKUSD'. 

And Spaces also causing issue in reading.

Is there any other method to read?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!