AS400 – DDS

130 pts.
Tags:
AS/400 - DDS
DDS
Hello All, I am having one doubt related to display file handling. Let’s say I have one Display file which handles different functionalities like add/update/delete/display of records. For Adding record (Function 10 from main screen) I have a separate window screen. I am doing data validation for this window screen. The problem I am facing is whenever I enters some invalid data and re-displays the window screen again the existing invalid data from screen gets cleared. I want to retain the invalid data, so that user can change the date and add record. Can anyone help me in this regards. Check out the code, If some error in window screen, as per logic it will GOTO LABEL1 and “EXFMT EMPADD” after this window screen will get displayed with no datas in fields. LABEL1 TAG EXFMT EMPADD IF *IN03 = *ON EVAL *INLR = *ON GOTO LABEL2 ENDIF IF EMPIDADD = *BLANKS OR EMPNAMADD = *BLANKS OR EMPSEXADD = *BLANKS MOVEL ERRMSG5 INFMSG2 GOTO LABEL1 ENDIF IF EMPSEXADD = *BLANKS OR EMPSEXADD <> 'F' AND EMPSEXADD <> 'M' MOVEL ERRMSG6 INFMSG2 GOTO LABEL1 ENDIF

Answer Wiki

Thanks. We'll let you know when a new response is added.

I don’t see any issue with the program code.

How are the fields defined on the record format? If they’re defined as I (Input) rather than B (Both input & output) that may be the source of your problem.

———————————————————————————————————————-
right, I agree on the possibility of an I instead of a B on your window fields.
I try to avoid being critical but, GOTO’s and Labels are not allowed in most IT standards.
These operations make code that is unreliable and hard to read.
Phil
———————————————————————————————————————

Meh. Tags can be misused like anything else – there are times when the contortions required to avoid tags make for more illegible code.

———————————————————————–

I don’t think the code above is well structured.

Phil

———————————————————————————————————————

Didn’t say it was.

Splat

Discuss This Question:  

 
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

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