Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
To split a string with a space
Name: Sharitha Date: October 6, 2004 at 06:05:00 Pacific OS: OpenVMS CPU/Ram: DS20E
Comment:
Hi, I have file in whish the record are stored as 30 95 40 89
i need to read this file line by line and split the String into 2 variables eg: variable a =30 varibale b=95 Kindly help
Name: Hakan Andersson (by HakAnd) Date: October 6, 2004 at 07:27:59 Pacific
Reply:
a = f$element(0," ",string) b = f$element(1," ",string)
0
Response Number 2
Name: Bob Gezelter Date: October 6, 2004 at 08:44:04 Pacific
Reply:
Shari,
Hakan has provided an example of how to split the records in DCL, the command language used on OpenVMS.
Taking a second look at your posting, it occurs to me that you did not mention the language you are using. If we know the language, the answer may be clearer.
- Bob Gezelter
0
Response Number 3
Name: Hakan Andersson (by HakAnd) Date: October 6, 2004 at 09:20:57 Pacific
Reply:
As Bob mentioned, I took for granted that a DCL command was requested........
0
Response Number 4
Name: VMSFan Date: October 7, 2004 at 14:30:52 Pacific
Reply:
It might also help to:
F$EDIT(string, "COMPRESS,TRIM")
before using F$ELEMENT (just in case there may be extra spaces).
Summary: Hi I want to use the sed command to replace a date such as Apr 25 to today. I used the following command but it gives me a garbled error x=`date "+%b %e"` ls -l | sed 's|'$x'|(today)|g' the error is:...
Summary: I have after received some corrupted files in the HPGL format, but that is an other story... finally got a solution. The HPGL file is with fixed length 512 byte records and file organization is sequen...
Summary: Does anyone has a VMS command procedure log out a terminal server port? We get orphaned connections on our Xyplex Terminal Server port. TO clear the problem, we telnet to the Terminal Server and t...