Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Subject: reading a line with DCL

Original Message
Name: Asaf Karagila
Date: March 18, 2005 at 07:48:15 Pacific
Subject: reading a line with DCL
OS: OpenVMS 6.2
CPU/Ram: AlphaServer 800/512Mb SDR
Comment:
Hi,
how can i read a specific line from a file,
without reading everything before it ?

my problem is that i have no compiler to use, only DCL.

thanks,
- Asaf.


Report Offensive Message For Removal

Response Number 1
Name: Bob Gezelter
Date: March 20, 2005 at 00:01:45 Pacific
Subject: reading a line with DCL
Reply: (edit)
Asaf,

If the file is indexed, you can use the DCL READ command to access it by key.

Otherwise, there is no direct way to read the nth record in a sequential file (that is not a DCL restriction, it is a more general restriction of variable length sequential text files).

If you are looking for a record containing a particular string, you can use the SEARCH command to locate it, then process the output of SEARCH.

If you have no compiliers, you DO have the MACRO-32 compiler, which can be used (ok, it is assembler, but I want people to remember that it is included). Also, you can download JAVA and the various **IX tools, such as PERL at no charge from http://www.hp.com/go/openvms.

I hope that this is helpful.

- Bob Gezelter, http://www.rlgsc.com


Report Offensive Follow Up For Removal

Response Number 2
Name: Asaf Karagila
Date: March 21, 2005 at 11:06:30 Pacific
Subject: reading a line with DCL
Reply: (edit)
well, the file is a text file..
i don't think it's indexed or anything.

what is the MACRO-32 ? i never came across that on the OpenVMS, but that might be removed because it is a military computer,
which makes it unaccessible to internet as well.
so that takes out the java and perl etc.

i've got an idea though.
tomorrow i'll give it a try and see if i can make it work.

the entire idea is to just take out a block from a text file,
from an unknown location within the file.
is to locate the certain parameter i'm looking for,
and then take the 5-6 lines previous to it.

now comes the problem i had,
i couldn't go back in the file after a READ,
otherwise i'd just go to selected lines,
what i intend to try is to output the SEA with line numbers into a file,
get the line number, and read empty buffers until like, 10 lines before the line number,
then to extract the 10 lines i need.

isn't that something.

considering the tools i work with,
i'm doing some really good things..

- Asaf.


Report Offensive Follow Up For Removal

Response Number 3
Name: erensm
Date: March 21, 2005 at 14:15:29 Pacific
Subject: reading a line with DCL
Reply: (edit)
Do you know the /WINDOW= qualifier of SEARCH ?

Report Offensive Follow Up For Removal

Response Number 4
Name: Asaf Karagila
Date: March 21, 2005 at 20:31:05 Pacific
Subject: reading a line with DCL
Reply: (edit)
yes, i am aware of that. but i need it to be automated.
otherwise i would've searched it with EDT or something like that..

Report Offensive Follow Up For Removal

Response Number 5
Name: Asaf Karagila
Date: March 25, 2005 at 00:25:34 Pacific
Subject: reading a line with DCL
Reply: (edit)
Well, it works.
I used "sea /num/out=temp.tmp Myfile"
and read the line numbers, decreased 20 of the number, buffered the lines until the location i want,
and outputed to another file the 20 lines i needed.

it's working perfectly. although i'd enjoy a F$SEEK(file handle,line number) infused in DCL...


Report Offensive Follow Up For Removal

Response Number 6
Name: venmala
Date: August 1, 2007 at 22:43:10 Pacific
Subject: reading a line with DCL
Reply: (edit)
Hi ,

Can you please explain the process in detail of retrieving some particular lines as this seems to similar to my requirement.I need to cross-check the files in VMS and the same file downloaded into windows by retrieving lines with a sort of search criteria

DV


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: reading a line with DCL

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software



Version Tracker Pro
Keep your software current and secure, effortlessly

Click Here for a Free Scan

Driver Agent
Automatically find the latest drivers for your computer.
Click Here for a Free Scan



The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC