ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Completely out of my depth....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Completely out of my depth....

    So a client reached out to me for support of their AS400. I know absolutely nothing about AS400s, nor do I know how to manage anything with it (they usually don't ask us for help with this, and something happened to the person responsible for it.)

    They're getting a CPF4101 error when trying to open a file. Looks like the file was deleted. I muddled my way through trying to figure out how to restore it, but I don't have a DEV name to put in, and I don't know where to find that.

    If they don't have a good backup for the missing file, is it possible to restore any way else, or just create a blank new file? (might be a dumb question.)
    Thanks so much for everyone's help!​

  • #2
    Files on IBM i (or "AS/400" if you're really using a 23+ year old version -- but most of the time people call it "AS/400" out of bad, old, habits) are actually database tables.

    So your program is looking for a database table, and can't find it... Here are some thoughts:

    1) Perhaps the database table exists, but just isn't in your *LIBL? *LIBL means "library list". A library is a folder -- a container that contains files, programs, etc. A library list (or *LIBL) is the users current list of libraries to search when looking for something like a file or program. You can think of it like the PATH from MS-DOS or Unix. So it's possible that the "file" (database table) exists, but just isn't in the *LIBL (search path). You can use WRKOBJ *ALL/NAME to search for it, and EDTLIBL to add libraries to the *LIBL.

    2) If it really was deleted, restoring from backup is your best bet.

    3) A blank file might be a possibility... but since it is most likely a database table, you will need to know which fields (columns) existed, what their names were, data types were, etc... and make another one with the exact same layout. That might not be so easy, especially for someone who doesn't have full technical details of the application or prior experience with the platform.

    4) Obviously, a blank file won't have the customer's data in it. :-) Naturally, I don't know if prior data is important for this customer, or not.

    Just things to think about... welcome to the forum!

    Comment


    • #3
      Thanks for the food for thought!

      Click image for larger version

Name:	20230224_124444.jpg
Views:	333
Size:	2.88 MB
ID:	158333

      I really do think it's an AS400...

      Attached is a screenshot for when we try to access the "directory".

      When I put the command WRKOBJ *ALL/NAME in, I just get back (Cannot find object to match the specified name.)

      Click image for larger version

Name:	Screenshot 2023-02-24 at 6.46.17 PM.png
Views:	334
Size:	38.7 KB
ID:	158334

      For restoring, I'm guessing that DEV is for the tape backup (if it existed,) right?

      Click image for larger version

Name:	Screenshot 2023-02-24 at 6.47.41 PM.png
Views:	329
Size:	371.5 KB
ID:	158336
      Attached Files

      Comment


      • #4
        1) Re "AS/40" it is really unlikely that you have an AS/400 no matter what people in the company call it. They haven't been made or sold in over 20 years. If you issue the command "DSPDTAARA QUSRSYS/QSS1MRI​" you will see the operating system release level displayed. Let us know what it says.

        2) If you want to know if file WHDF220 exists on the system you need to issue the command "WRKOBJ OBJ(*ALLUSR/WHDF220)" that will tell you if it is on the system somewhere. If you find it then refer to Scott's comments on Library list.

        3) Is there no documentation anywhere around? Has the previous programmer died? Are no previous staff available?

        4) Re restoring the file. If any backup has been done you need to know where it is. When the restore asks for a DEVice it is expecting you to point it to a magnetic tape (if you have those) or to a device known as *SAVF (a savefile) which is a souped-up kind of zip file. But arbitrarily restoring a file without understanding where the original disappearded is asking for more trouble than you already have.

        Comment


        • #5
          Thank you also for responding!

          1) V5R4M000 2924

          2) I do get some results below, but I'm not sure if that means it exists ​or that it's just a link. DSPF means that it's a command, and not the actual file, right?

          3) No documentation that the owners can point me to and the implication is that the previous person had it in their head and is no longer available to help (not sure exactly what that means, but I didn't chase it too hard yet.)

          4) Woof, there's the rub. There's a broken tape backup next to the server, and I don't know if the tapes are any good still (doubtful), or if I can even find a device nearby that'll read those tapes in the first place. I will call around come tomorrow morning if that's my only recourse.

          On a slightly different note, is this also the right place to ask if there's anyone here that is hireable, in case they 're looking for someone new to maintain their system? I apologize in advance if that's a rude question. I just know that this is the only client of mine running this, and not sure it'll be in my wheelhouse to a satisfactory level. (I'm very happy to learn! But I'm don't like wasting anyone's time or money =[ )
          Attached Files

          Comment


          • #6
            DSPF means it is a DISPLAY FILE
            PF = Physical File
            LF = Logical File which is a "view" or "Index" of the PF

            A display file is used to display information on a screen. It defines the fields that are displayed, and their positions on the screen.

            Last edited by MFisher; February 27, 2023, 08:26 AM.

            Comment


            • #7
              A PF (Physical File) contains data. Customers, orders, Invoices, Items or Products. Losing a PF can be a disaster.
              Missing a DSPF display file is probably going to be an easier fix than missing a data file. There should be source code for it in a file called QDDSSRC, in whatever library contains production source code.

              You can put an '8 - Display Description' next to those 3 XXXXXX files, scroll to page 2 of the result, and see if any of them have a recent "Last Used" date.

              So, you need to determine if the DSPF XXXXXX is actually missing/deleted , or just that the application can't find it because it's not looking in the correct library, and 1 of those 3 listed is the live one. I assume XXXXXXTEST is not live, but you never know.

              Also, This is a good time to see what the backup strategy is.
              Last edited by MFisher; March 3, 2023, 08:53 AM.

              Comment


              • #8
                Ok, digging in with MFisher's help...

                The last used date for two don't have anything in them, and for one of them, the last used date is from '09. I'm guessing the actual file got deleted. The backup tapes haven't been touched or functional since before the current manager took over 6 years ago.

                So yeah, this isn't ideal.

                To clarify (not sure if this matters) this company is a subsidiary of my client's and they've handled their own stuff until now. Digging in more this morning, I found out that the previous person who had the knowledge of the system retired years ago and refused to document or has stated that he doesn't want to deal with the system anymore. He hasn't returned their phone calls, so I was asked to come in.

                From what I can gather, the system hasn't been changed in a very long time, so maybe the test display file will be the same and can be copied over? How likely would it be that there would be several displayfiles with the same name that aren't different versions of each other?

                Comment


                • #9
                  "....How likely would it be that there would be several display files with the same name that aren't different versions of each other?...."

                  It's fairly common to have copies in DEV or TEST environments. But are they the same version as PROD ?? That's another question.
                  If nobody is maintaining the system, I wonder how a file got deleted.

                  If you run WRKOBJ *ALLUSR/XXXXXX again, opt 8 , what are the CREATION DATES ?

                  What do you get when you run this ?
                  WRKOBJ *ALL/QDDSSRC
                  Last edited by MFisher; March 3, 2023, 08:54 AM.

                  Comment


                  • #10
                    You could also run WRKOBJ *ALLUSR/XXXXX2* OBJTYPE(*FILE) with the asterisk wildcard to see what libraries related WHDF2 objects are in.
                    That may explain which library is missing XXXXX.

                    Also, what is the application they are trying to run ? Something they run regularly ? When was the last time ?
                    There's a slight possibility they chose an obsolete option by mistake that is non-functional.
                    Last edited by MFisher; March 3, 2023, 08:54 AM.

                    Comment


                    • #11
                      "I wonder how a file got deleted."

                      My guess is someone trying to troubleshoot an issue might have done it, but there's a lot of "pleading the fifth" going around.

                      The files were all created over a decade ago (2002, 2004, AND 2006) with the latest one being last changed in 2012.

                      image.png

                      I can screenshot the next page or two if need be.

                      Running WRKOBJ *ALLUSR/WHDF2* OBJTYPE(*FILE)​: The library is XXXXXXX, which I believe is their production library. I'm seeing similar objects in XXXXXXXX2, which I'm assuming to mean XXXXXXXX2. XXXXXXXX does not have 220, but XXXX does, so do TEST and PROGRAMS.​​​
                      Attached Files

                      Comment


                      • #12
                        You could create a duplicate of XXXXX from COSV to COLD and see what happens. The application will be quite picky and if that is the wrong version of XXXXX you will get an error, possibly a "Level Check". meaning there is a mis-match between what the program is expecting for a file definition, and the one that is available in that library.

                        For example, if the program displays customer information. Name, address, city , phone #, then the display file will have those fields defined. But if the DSPF version you duplicate is older, and does not include phone #, you will get an error.

                        CRTDUPOBJ OBJ(XXXXX) FROMLIB(XXXLIB) OBJTYPE(*FILE) TOLIB(YYYLIB)

                        If it fails, then the created file can be deleted, and start looking for the source code to recompile it.
                        Last edited by MFisher; March 3, 2023, 08:55 AM.

                        Comment


                        • #13
                          This is what I got after running that command:

                          C
                          Session or device error occurred in File WHDF220 (C G D F)

                          Comment


                          • #14
                            I do believe that I ran the command correctly since WRKOBJ *ALLUSR/WHDF220 does show a DSPF in XXXXXXXX.

                            Comment


                            • #15
                              At the top of that page there is also a "Message queue allocated to ACS" or something like that.

                              Comment

                              Working...
                              X