Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9203663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:31:21+00:00 2026-06-17T23:31:21+00:00

From my COBOL program, I’m calling my C module which itself makes calls to

  • 0

From my COBOL program, I’m calling my C module which itself makes calls to a proprietary library. This library insists on writing to stderr, although there’s no stderr available since the main program is written in COBOL. Consequently, the program aborts with this message:

cannnot open stderr

The support guys at HP advised me to issue

PARAM SAVE-ENVIRONMENT ON

in TACL before running the program. This indeed solved my problem. However, my program will be used by several people in a number of scripts and I don’t want to force them to issue PARAM SAVE-ENVIRONMENT ON prior to running the program.

Is there some COBOL85 directive which allows me to properly run the program without changing any parameters manually? Something like

?PARAM SAVE-ENVIRONMENT ON

would be great…

EDIT:

Since I’m able to modify the C module (not the library), I’d be completely satisfied with a C-based solution. However, simply opening stderr before calling the library didn’t solve my problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:31:22+00:00Added an answer on June 17, 2026 at 11:31 pm

    PARAM SAVE-ENVIRONMENT ON makes HP COBOL-programs save environment variables (which they receive as messages at startup from Guardian) for future calls to getenv() from C modules.

    Actually, the library I’m using tries to open stderr because it can’t read environment variables. One solution is to set the PARAM SAVE-ENVIRONMENT to ON, so getenv() will properly function again. This has to be done in each TACL session.

    Unless: you use the ?SAVE STARTUP– or ?SAVE ALL-directive in your COBOL program to achieve the same effect.

    Lessons learned:

    • Don’t mix COBOL and C.
    • Don’t use COBOL at all.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From my website, I have a button which calls a method and then generates
A Cobol program reads a record from a first flat file and compares it
I ran into a strange statement when working on a COBOL program from $WORK.
From this context: import itertools lines = itertools.cycle(open('filename')) I'm wondering how I can implement
From the Scala API , I got the following example, which does not compile;
Is there a program that will take response curve values from me, and provide
This is my problem, I'm building an iOS with some JSON returs from my
How could this be happening? sqlite> select read, text from message; 1|No just got
Can we pass arguments to a REXX program from JCL? I suppose, JCL PARM
The following program takes two inputs (comma separated) from the user: puts Enter the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.