- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- VMS BASIC program not writing out the last record ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2013 06:49 AM
тАО09-26-2013 06:49 AM
VMS BASIC program not writing out the last record in a file
I ran into a weird problem with a BASIC program where when the program is run manually it works fine. All records in the input file are accounted for in either good output or bypass/error files. But when the same program is run within a DCL script it is omitting the last record in the file. It doesn't get written to any of the output or error/bypass files.
I've run it into debug several times and it reads every record and outputs every record. I've tried all the obvious solutions so far - recompiling, etc, with no luck. Any ideas why this would be working manually but not within a script? Is it possibly system-related?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2013 02:17 PM
тАО09-26-2013 02:17 PM
Re: VMS BASIC program not writing out the last record in a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2013 02:03 AM
тАО09-28-2013 02:03 AM
Re: VMS BASIC program not writing out the last record in a file
>> - recompiling,
Hmm, you call is "obvious solutions", I call it "Insanity" as per Einstein's defintion:
'doing the same thing over and over again and expecting different results.'
>> All records in the input file are accounted for in either good output or bypass/error files.
The is precious litle information to go on here.
How is the input read? INPUT or GET statements?
Through a process permanent file (file opened by DCL, for example SYS$INPUT)
What kinda inpu file? (If you don't understand the question, attach DIRECTORY/FULL output)
Is the last record special, for example for a stream-lf input file the last record sometimes does NOT have a formal terminator (Compare DUMP/BLOCK=START=... with DUMP/RECORD=START=...)
Surely the program has a loop, which likely terminates on an EOF condition.
Does that last record trigger an EOF pre-maturely.
How about adding a simple record count + display after the loop.
How it the output written? PRINT? PUT? Regular 'OPEN'ed file? Need a final CLOSE (or FLUSH) ?
Deferred write? Write-behind?
Show us some core code? OPEN, Loop, GET, eof-test, CLOSE?
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2013 03:06 PM
тАО09-29-2013 03:06 PM
Re: VMS BASIC program not writing out the last record in a file
Hi as Hein says is this an RMS record or SQL or Stream file ?
Do you move the mapped buffer to another in order to display it ? Is the display a print statement ? Especially on error handling.
Does the program do a system call to the DCL error on end of file, is end of file status hard coded or do you use a library value for the error code ? This is most important since it would explain interactive vs command procedure driven behavior.
Please provide much more info about the file access, and error handling in the code; perhaps code samples or mock up if necessary
Without this it is not possible to answer your questions.
Thanks!