• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 673
  • Last Modified:


We using object ABC which was created. Which is adding/updating rectods in 13 files.  
Change/Usage information:                                    
  Change date/time . . . . . . . . . . :   05/23/09  05:31:14

we dont own the source for ABC.

Two days back the job failed for some reason. One of tech. support rename physical file to abc0825 it had logical file attached and changed back to original file ABC.

now object says file ABC created
 Change/Usage information:                                    
   Change date/time . . . . . . . . . . :   08/27/10  22:43:32
   Usage data collected . . . . . . . . :   YES                

Now the problem is for some reason when job run last night it didnt updated two column in ABC file . I did DSPDBR and i dont see any depedance on the ABC physical file. (where as it has logical file which is pointing towards abc0825).

can someone please help what need to be done ...We need original object for physical and logical file so program run correctly and update the row in those two columns.

Since we dont own the source we can't re-compile the physical and logical file.
  • 2
1 Solution
Gary PattersonVP Technology / Senior Consultant Commented:
Renaming a physical file does not change the file's creation date.  Looks like tech support may have RENAMED the PF to abc0825, and then COPIED the renamed file using CPYF or CRTDUPOBJ.  If that is what happened, then the logical files are still attached to abc0825, since copying a file does not cause it's dependent logicals to be copied.

If the tech wanted to save a copy of the current file contents, he should have COPIED the file (CPYF or CRTDUPOBJ) instead of renaming it.  That is the cause of the problem.

1) Does the logical still exist, or was it deleted?  If it was deleted, and you don't have source code, you'll need to restore the logical it from a recent backup (RSTOBJ).  Only restore the logical file.
2) If the LF still exists, what physical is the logical file attached to right now? (Probably the abc0825 file).

DSPFD FILE(lib/logicalfilename) - look under the Access Path Description section to see the Physical referenced.

In this case, the fix is to:

1) RENAME the current ABC file (RNMOBJ) to ABCtemp
2) RENAME the ABC0825 file back to ABC (RNMOBJ)
4) Then, COPY the contents of ABCtemp to ABC (CPYF)
5) Delete ABCtemp

You should make sure no jobs are using this file as you make these changes.

- Gary Patterson

tkshatriyaAuthor Commented:
Thank you Gary for your quick response. Yes, logical is still attached with abc0825.  Tech.support rename the object of physical file abc0825 to ABC and then recompiled the ABC.  now the problem is program object was created (Change date/time . . . . . . . . . . :   05/23/09  05:31:14)  and physical file  compiled yesturday and logical file is still attached with abc0825.

Can i restore the object of the PF and LF file ABC from last week back up. Will my program work ?
Hi tkshatriya,

Yes, restoring your file and logicals should be a solution (I would suggest you to delete the logical files first and make sure your phisical file is still abc0825 for not interferring). But you might lose datas between de backup file and your current one...


Gary PattersonVP Technology / Senior Consultant Commented:
No idea if your program will work, I'm afraid.  I'd need to know more about the program and the contents of the file to make a guess.  Restoring may be your only option, though.  

LewisPower gives good advice above.

If the file content is critical, or is related to other data, maybe not.  

If the file is just a work file that is cleared every time the program runs, or contains static data, then you may have no problems.

Why did tech support change the files around in the first place?

- Gary Patterson
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now