PF in Cobol program

30 pts.
Tags:
AS/400
COBOL
Physical File
I am currently working on a Cobol program, on a AS/400, where I had to revise the PF layout and made adjustments to the source program and compiled it. Problem is, the program is still picking up the 'old' PF layout instead of the newly revised layout? Any thoughts or suggestions that I missed? I re-compiled the source program after the PF compilation.
1

Answer Wiki

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

Did you change the copybook in the source code to point to the new FD?

Discuss This Question: 6  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.
  • Splat
    Check your library list.
    12,865 pointsBadges:
    report
  • redman1

    Thanks for replying! I had hard-coded the file layout in the envir / data-divisions and such....to directly point to the new file layout. The source program is not a very big program. I am befuddled on why it still picks up file A and not file B...  I had given thought of removing the old file that the source program still attached to?

    30 pointsBadges:
    report
  • redman1

    lets try this again-sorry?

    FL2 - NAME OF NEW FILE (CODED IN COBOL SRC).

    KBBFL2 - NAME OF DDS FILE

    BNCFL - NAME OF 'OLD' FILE LAYOUT THATS BEING PICKED UP.

    i TRIED THE CHGPF COMMAND EVEN.... DIDNT CHANGE. I ONLY KNOW THIS BECAUSE NAME IS STILL 19 AND CHANGED IT TO 30CHAR.

    IF THIS HELPS?

    SORRY, IM STILL WRAPPING MY HEAD ON THIS ISSUE?

    THANKS FOR REPLYING.....

    30 pointsBadges:
    report
  • Splat
    A CHGPF will change attributes of the file but will not rename the file. 

    At best I'm minimally familiar with COBOL, but I would think if you'd changed the actual file name in the program from the old to the new & successfully compiled the program the change would be reflected.

    Could it be there is another version of the program in your library list, one that would not have been altered to use the new file?
    12,865 pointsBadges:
    report
  • redman1

    I went ahead and created a new file. crtpf. 

    saved dds.

    compiled dds.

    made changes to cobol source.

    recompiled.clean. executed...

    and Walah....success......

    DONT ASK ME "HOW", or why,

    it didnt take before.....?

    im going through the steps again....

    thanxs for looking into this! I appreciate your input!!!

    30 pointsBadges:
    report
  • Splat
    Glad it worked out for you.
    12,865 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.

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

Following

Share this item with your network: