Computing.Net > Forums > OpenVMS > To read end of line -DCL

To read end of line -DCL

Reply to Message Icon

Original Message
Name: Sharitha
Date: October 7, 2004 at 00:11:15 Pacific
Subject: To read end of line -DCL
OS: OpenVMS
CPU/Ram: 512
Comment:

I have a file in which the data is

35 90

45 89
wat happens is wen i am using
a =f$element(0," ",string)
b =f$element(1," ",string)
i get a = 35 and b=90 but later while reading the second line it takes the blank line and computes for that too.
a =" "
b=" "
How do i validate the end of line or blank space .pls let me know the equivalent end of line character
.


Shari


Report Offensive Message For Removal


Response Number 1
Name: Bob Gezelter
Date: October 7, 2004 at 02:30:43 Pacific
Reply: (edit)

Sharitha,

From the way you phrased the question, it seems clear this time that you are using DCL.

The READ command that you are using has an /END=label option (a full description can be found in the HELP text under HELP READ). When you get an end of file, control will transfer to the label specified in the /END option.

- Bob


Report Offensive Follow Up For Removal

Response Number 2
Name: Hakan Andersson (by HakAnd)
Date: October 7, 2004 at 02:39:38 Pacific
Reply: (edit)

You have to start by verifying an empty string or not.

$10:
$ READ/END=EOF infile string
$ if string .eqs. "" then goto 10
$ A=........
$ B=........
$ goto 10
$EOF:
$ close infile


Report Offensive Follow Up For Removal

Response Number 3
Name: Sharitha
Date: October 7, 2004 at 04:40:30 Pacific
Reply: (edit)

thanks it was very usefull
I have another doubt


hi,

I trying to write the following sql script for one of my application

!the file script.com

select bcci.id, max(bcci.no) from info
bci,inf bcci
where bci.no= '&1'

run the script.com with parameters as follows

sqlplus / @script 11

it's giving the exact output that i needed but with two lines in the begining as follows

old 3: where bci.no= '&1'
new 3: where bci.no= '11'


but i dont want this two lines, because it is difficult to read the required data from the file. could any of you suggest how to suppress those two line so that i can get only the query output

Shari


Report Offensive Follow Up For Removal

Response Number 4
Name: Hakan Andersson (by HakAnd)
Date: October 7, 2004 at 06:23:02 Pacific
Reply: (edit)

Sorry......sql is not my cup of tea.


Report Offensive Follow Up For Removal

Response Number 5
Name: WillemGrooters
Date: October 18, 2004 at 02:08:32 Pacific
Reply: (edit)

<quote>
!the file script.com

select bcci.id, max(bcci.no) from info
bci,inf bcci
where bci.no= '&1'
</quote>

No DCL, but SQL. Quite a different matter.

I would chnage the whole issue to:

$!the file script.com
$
$ SQL
select bcci.id, max(bcci.no) from info
bci,inf bcci
where bci.no= "''P1'"
$!

Willem Grooters


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: To read end of line -DCL

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge