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

  • SEARCH
  • Home
  • 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 8134185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:55:29+00:00 2026-06-06T09:55:29+00:00

I am currently working on four of CL and RLG programs. The call stack

  • 0

I am currently working on four of CL and RLG programs. The call stack is as follows: A->B->C->D where A is the top caller CL program and D is the bottom callee RPG program. Program A has an OVRDBF statement with SHARE(*YES) option on a file, which is used as output in program D. Now I am facing a problem, which is that whenever D tries to write a record into this file error message CPF5149 is thrown telling me that the I/O operation is not valid. If I comment this OVRDBF statement in program A then D can write the record into the file without any problem. So why exactly does this OVRDBF cause trouble with I/O in a RPG program? How to solve it? Removing it might not be an option.

  • 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-06T09:55:32+00:00Added an answer on June 6, 2026 at 9:55 am

    The SHARE(*YES) option to OVRDBF keeps the data path open. If the first program in your call stack that opens the file opens it as read-only then it will stay that way for all other programs.

    Generally SHARE(*YES) is only used when you want to use the OPNQRYF command to filter records before passing them into another program.


    UPDATE:

    The open attributes of programs B, C and D (whichever is first to open the file) in your example will control the open status.

    If you are using OPNQRYF specify the OPTION(*ALL) parameter to force it to open the data path with full read/write/update/delete attributes.


    IBM i Information Center: Sharing an Open Data Path

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a simple Rails app, which currently has four pages - Home,
I'm currently working on an application wich will do four things via web services
I'm currently working on a program (for fun, this is not an assignment) that
I'm currently working on a 100,000 page website, the current design has been in
I am currently trying to write a program that is a connect four game
I am working with a consulting group on a program which currently uses a
I'm currently working on the iPhone with Audio Units and I'm playing four tracks
I am currently working on making a Python version of the game Connect Four.
Currently i m working on a project where there are users with four roles
Currently working with converting SQLException error messages into messages that are more useful for

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.