Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

COBOL Programming :: RE: Query on Splitting up a file

$
0
0
Author: Rohit Umarjikar
Posted: Tue May 03, 2016 10:02 pm (GMT 5.5)

1.scan the input field byte by byte and as soon as you hit the '"' then replace ',' by ';' till you hit ending '"' and continue this till the end of the string.
2.Do a inspect and replace ',' by '|'
N|88320|00254XMT03GUIDE|6U|6156|1/1/2001|GLOVEBOX XM C
ANNEL GUIDE|2016||||O|"ED; EE"'.
3. Unstring delimited by '|'
4. Now you will have "ED; EE"' value in one of the variable.
5. Work in this now , use unstring delimited by ';' into 10 variables.
6. You will get "ED in one of the variable from step5, now remove '"' by any method you want ( e.g. use byte by byte check and get rid of '"')
_________________
Regards,
Rohit Umarjikar
"Some things Man was never meant to know. For everything else, there's Google"


Viewing all articles
Browse latest Browse all 9405

Trending Articles