adding field on screen DSPF

125 pts.
Tags:
AS/400
COBOL
DSPF
Screen Design Aid
Hi, i added a new field on the screen, declared the variable just like a similar one present in the screen. now I am changing the COBOL program of the same screen. I used the same variable to move value into it. As test I and to check whether issue is with how i have declared the variable in dspf I am moving value of another similar field (phone number). did the changes compiled the dspf first and then the COBOL. and while calling and running the screens I could see the constant fields i have added but the field is coming as blank. question is: can any1 pls tell me how the variables in the dspf screen file is getting linked to the COBOL. I tried tracing other fields used and it doesn't seems to be any different. so while introducing a new field to the screen, how is that get linked to the COBOL pgm feeding values to that same screen ?? Thanks in advance

Software/Hardware used:
as/400

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: 5  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
    so while introducing a new field to the screen, how is that get linked to the COBOL pgm feeding values to that same screen ?? When you recompile the program, the new DSPF definition is brought into the program. If you have added source lines to move a value into a new screen field, the value will be displayed on the screen after you WRITE the record. If the value doesn't display, the definition in the DSPF might be wrong or the COBOL statements might be wrong or you might be accessing the wrong copy of the DSPF or other possible problems might exist. If you don't show us the field definition in the DSPF and the definition as it looks in COBOL, as well as the statements that MOVE the value into the DSPF field, we have no way of guessing what might be wrong. When you show us definitions from the DSPF, you should also include fields next to the field that has the problem. They might interfere with each other on the screen. Tom
    125,585 pointsBadges:
    report
  • itkr
    Thanks Tom, adding some more info to this while running the COBOL in debug I could see it is writing to DG282SR1 (where DG282SR1 is the record in DSPF) DG282SR1-OUT has record read of length 540. I could find while this is getting written it is only displaying values that are until 480 in DG282SR1-OUT?? Can you help me where I can check this record length in DSPF or COBOL? I think issue is some where in DSPF file in record length. ??
    125 pointsBadges:
    report
  • TomLiotta
    Can you help me where I can check this record length in DSPF or COBOL? Yes. But you have to show the portions of your COBOL program that are involved. For example, if you use a /COPY statement to define the record format, then you have to show us the statement. If you have DDS that defines the DSPF record, then you have to show us the DDS source. I might suspect that the field has usage of 'I'nput, for example, and you use it for 'O'utput. Or there might be a number of other possibilities. If we can't see the source, we can't guess appropriately. Tom
    125,585 pointsBadges:
    report
  • itkr
    hey Tom, Thanks .. I could fix this issue. In the COBOL pgm the SCREEN-FILE had record defined with length 480.
    125 pointsBadges:
    report
  • TomLiotta
    In the COBOL pgm the SCREEN-FILE had record defined with length 480. The record length shouldn't be coded into the program. The /COPY statement(s) for the file formats should supply the record length(s) whenever you recompile. Glad you located the problem. Tom
    125,585 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