STRSDA – How to protect a field

440 pts.
Tags:
AS/400
STRSDA
Hi, Can anyone please try answering my query: Requirement: I have a field that is declared as both (input & output) in the display file. In case the mode is 'Change' I want the screen field to be in input mode. In case the mode is 'Inquiry' I want the screen field to be in output mode. Used DSPATR(PR) with an indicator 80 assigned to it. When its a change mode I am setting the indicator OFF and when its an inquiry mode I set the indicator ON. But when I try to execute I don't see the output as desired. The display file still opens in editable mode irrespective of change or inquiry. Thanks, Sruthi

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    First, if we can't see the DDS source for the and the segment of program source for setting the indicator *ON and *OFF and writing the record, we can't say what is wrong. Don't just tell us what you think the code does; also show us what the code does because it clearly is not doing what you think it's doing. . Second, don't use an indicator at all. Use the program-to-system-field support. Set the field value instead of using an indicator. . Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Typo: "...if we can’t see the DDS source for the [display record] and..." . Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    80 DSPATR(PR) Should work. Question: are you using indicator 80 for any thing else on the display file or in the program? Every field that should be protected should have the DSPATR(PR) line.
    49,550 pointsBadges:
    report
  • philpl1jb
    I would use Debug to make certain that the indicator was on at the time the ExFmt command is issued.
    49,550 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following