View previous topic :: View next topic |
Author |
Message |
e_thani Beginner
Joined: 26 Jul 2004 Posts: 4 Topics: 1
|
Posted: Mon Jul 26, 2004 4:09 am Post subject: Problem with Unstring... |
|
|
I have one doubt in Tab separated Sequential file
Consider a flat file which has Tabs separated records ..i want to read this file and remove all those Tabs and write into another flat file..
I used Unstring Method like
UNSTRING INPUT-REC DELIMITED BY X'09' INTO
FIELD-1
FIELD-2
FIELD-3
END-UNSTRING
But it works only for first field and other remains blank |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Jul 26, 2004 5:37 am Post subject: |
|
|
e_thani,
The tab character value on the mainframe is x'05'. It translates to x'09' on the PC.So if you are running the unstring command on the mainframe you should be delimiting the field by X'05'.
Code: |
UNSTRING INPUT-REC DELIMITED BY X'09' INTO
FIELD-1, FIELD-2, FIELD-3
END-UNSTRING
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|