Difference between source physical file and physical file on AS/400

Tags:
AS/400
Physical File
What is AS/400? Difference between source physical file and physical file?

Answer Wiki

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

Source Physcial file (PF-SRC) contains program source code.
PF-DTA contains data.

The PF-SRC file will contain one member for each program source code.
The PF-DTA file may contain one or more members, each can contain any number of records.

Hope this helps, feel free to ask more.

Discuss This Question: 17  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.
  • dinuas400
    Both are physical files... Both can contain many members... But PF-SRC in general we are having our programs... if you want to view the members of your PF, You can use WRKMBRPDM and give the LIBNAME/PF name
    510 pointsBadges:
    report
  • vishalat009

    Can we create a logical view of Source physical file ?


    50 pointsBadges:
    report
  • CharlieBrowne

    Why would you want to do that?

    54,360 pointsBadges:
    report
  • azohawk

    I have never heard of creating a logical over a source file. I wonder why you would want to do so.

    If you can tell us that, we might be able to provide you with a way to accomplish what you are trying to do.

    1,915 pointsBadges:
    report
  • CharlieBrowne
    A source PF only has 3 fields. What would you want your access path to be? How would you use it?
    54,360 pointsBadges:
    report
  • ToddN2000
    in theory you could create a logical over the source physical. But why would you and for what purpose? Only valid original source would compile cleanly. Also source physical have a fixed record length and specific field/columns.
    48,725 pointsBadges:
    report
  • vishalat009

    Greeting everybody. Thanks for your comment.

    Actually I am trying to create a tool which will fix the COBOL/400 coding standard. This is the reason why I want to read SOURCE physical file member.

    50 pointsBadges:
    report
  • CharlieBrowne
    OK. So you do not need to create a LF. You can read the PF. Seems like what you want to do is to do a loop in your program to process each member. That makes sense and is a common task.
    54,360 pointsBadges:
    report
  • ToddN2000
    Post a sample of your looping code if you have any issues and we can help straighten it out. There are a few ways it can be done and you may have a preferred method.

    48,725 pointsBadges:
    report
  • vishalat009

    Hi Everyone ,

    Thanks for your support in giving feedback. Now the issue is solved.

    My next query is about DB2. I will give you a situation where ,

    You have 1 physical file and another physical file which is clone for 1st one in another library.

    Now , as per implementaion , there is a neccasity to change the 1st physical file. here I would like to know whethere we can do same changes to 2nd physical file in another library without refreshing or modification ?

    It will be kind Referential Integrity ?

    I would be great to here from you guyz :)


    50 pointsBadges:
    report
  • CharlieBrowne
    For your new query, my question is why can you not run the same procedure over the 2nd file as you will do over the 1st one.
    54,360 pointsBadges:
    report
  • ToddN2000
    Are you looking to update the second PF with the same input data used for PF 1?
    48,725 pointsBadges:
    report
  • vishalat009
    Hello Everyone,

    I just wanted to create Referential integrity concept here. Second PF is just clone / referenced from 1st PF. So my question is if I changes / modifies structure of 1st pf then automatically it should reflect changes to 2nd PF. I am not trying here update or copying data.
    50 pointsBadges:
    report
  • philpl1jb
    Is this a structure change, a data change, or a referential integrity change? Tell us more.

    53,910 pointsBadges:
    report
  • vishalat009
    I wanna do structural change to 1st P. Is there any way to reflect those changes to 2nd PF automatically without running any procedure?
    50 pointsBadges:
    report
  • CharlieBrowne

    Cannot change file structure easily.

    What process are you using on the base file to make the change? Are you doing a CHGPF or SQL Alter Table? Or are you totally recreating the file and copying the data back into it?.

    54,360 pointsBadges:
    report
  • philpl1jb
    no, you would have to repeat the process or some process similar process, for each instance of the file.
    53,910 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: