- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Crashing of program with SMG$ calls when run i...
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
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
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
10-04-2013 01:58 AM
10-04-2013 01:58 AM
I have a program in C which makes extensive use of SMG$ calls. The program works PERFECTLY when run from the command line but when run from within a command file it ALWAYS crashes with:
%SMG-F-EOF, end-of-file
break on unhandled exception preceding BATCH_USER_DIS\displayEmails\%LINE 34050
34050: rStatus = smg$delete_menu(&display);
DBG>
The offending line:
if (! (rStatus & 1) ) (void )lib$stop(rStatus);
Which is a trap for the line above it:
rStatus = smg$select_from_menu(&kb_id, &display, &number, &def_number, 0,
&def_number, &SMG$M_RETURN_IMMED,
0, 0, &term, &selected_desc);
Even if I comment out this code the program will crash when it next encounters some input requirements via SMG$ somehwere else in the program.
cc/ver
Compaq C V6.4-008 on OpenVMS Alpha V7.3-2
Anyone seen anything like this? Any clues?
Thanks for any help,
Mark.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2013 02:17 AM
10-04-2013 02:17 AM
SolutionMark,
by default, SMG$ calls read from SYS$INPUT. If you run your program from a DCL procedure, SYS$INPUT is the procedure itself. SYS$COMMAND is the terminal, from which the procedure has been invoked, if running in INTERACTIVE mode.
If you expect your SMG$ calls to read from the terminal, consider to add the following command into the DCL procedure, before the $ RUN your-program line:
$ DEFINE/USER SYS$INPUT SYS$COMMAND
This will direct your program to read from the terminal instead of from the DCL procedure.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2013 03:02 AM
10-04-2013 03:02 AM
Re: Crashing of program with SMG$ calls when run in a command file
Volker,
Wow, you're the man!!!
I had tried exotic set terminal things but couldn't understand why it would not work.
I just amended my SMG$CREATE_VIRTUAL_KEYBOARD to use the input-device of SYS$COMMAND: rather than SYS$INPUT: and it works a treat, but I think your solution of a quick redefine of the logical is the better solution.
Once again, thank you.
Cheers
Mark.