Good morning all,
After years of using the ProComm app for building scripts I have finally moved across to Zoc Terminal due to the need to use SSH connection.
I have only started to play with the scripts but have hit a problem using text delimited files and thought I would fire my question out into the big wide world to try to get a quick answer.
I have built the following test script to display the different variables but when it comes down to displaying the name it separates this into the different words, i.e. it takes the spaces as delimiters.
Any help would be much appreciated.
Script:
/* REXX */
file = "c:\Names.txt"
IF STREAM(file, "C", "QUERY EXISTS")\="" THEN SAY "File Exists"
do while( lines(file) )
data=LINEIN(file)
Parse Var data v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12
say v1
say v2
say v3
say v4
say v5
say v6
say v7
say v8
say v9
say v10
say v11
say v12
END
File:
1111 Test Name 1 40 5 10 20 30 40 50 60 120 180
2222 Test Name 2 40 5 10 20 30 40 50 60 120 180
When I run this the different variables shows as follows:
v1 - 1111
v2 - Test
v3 - Name
v4 - 1
v5 - 40
v6 - 5
v7 - 10
v8 - 20
v9 - 30
v10 - 40
v11 - 50
v12 - 60 120 180
v1 - 2222
v2 - Test
v3 - Name
v4 - 2
v5 - 40
v6 - 5
v7 - 10
v8 - 20
v9 - 30
v10 - 40
v11 - 50
v12 - 60 120 180
After years of using the ProComm app for building scripts I have finally moved across to Zoc Terminal due to the need to use SSH connection.
I have only started to play with the scripts but have hit a problem using text delimited files and thought I would fire my question out into the big wide world to try to get a quick answer.
I have built the following test script to display the different variables but when it comes down to displaying the name it separates this into the different words, i.e. it takes the spaces as delimiters.
Any help would be much appreciated.
Script:
/* REXX */
file = "c:\Names.txt"
IF STREAM(file, "C", "QUERY EXISTS")\="" THEN SAY "File Exists"
do while( lines(file) )
data=LINEIN(file)
Parse Var data v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12
say v1
say v2
say v3
say v4
say v5
say v6
say v7
say v8
say v9
say v10
say v11
say v12
END
File:
1111 Test Name 1 40 5 10 20 30 40 50 60 120 180
2222 Test Name 2 40 5 10 20 30 40 50 60 120 180
When I run this the different variables shows as follows:
v1 - 1111
v2 - Test
v3 - Name
v4 - 1
v5 - 40
v6 - 5
v7 - 10
v8 - 20
v9 - 30
v10 - 40
v11 - 50
v12 - 60 120 180
v1 - 2222
v2 - Test
v3 - Name
v4 - 2
v5 - 40
v6 - 5
v7 - 10
v8 - 20
v9 - 30
v10 - 40
v11 - 50
v12 - 60 120 180