MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with Unstring...

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
e_thani
Beginner


Joined: 26 Jul 2004
Posts: 4
Topics: 1

PostPosted: Mon Jul 26, 2004 4:09 am    Post subject: Problem with Unstring... Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Jul 26, 2004 5:37 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group