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

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 read end of line -DCL

Reply to Message Icon

Name: Sharitha
Date: October 7, 2004 at 00:11:15 Pacific
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



Sponsored Link
Ads by Google

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

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


0

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

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


0

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

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


0

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

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


0

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

<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


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to OpenVMS Forum Home


Sponsored links

Ads by Google


Results for: To read end of line -DCL

increase command line buffer www.computing.net/answers/openvms/increase-command-line-buffer/20.html

How to recieve arguments from user www.computing.net/answers/openvms/how-to-recieve-arguments-from-user/596.html

Search recursively www.computing.net/answers/openvms/search-recursively/344.html