ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

S36 Basic Files on an AS/400 Running SSP

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

  • S36 Basic Files on an AS/400 Running SSP

    We have a client that has an old AS400 running S36 mode SSP and all programs are written in S36 Basic and the files are also stored in S36 Basic. The person that set all that up is long gone and we have been providing support for backups and connectivity but little else. They now want to move all their data off that box to another platform like, maybe, Access.

    My question is does anyone know of a way to get a S36 Basic file off of that type system? Of course, it is no longer supported by IBM and Google has returned nada.

    Thanks in advance for any assistance!!!!

  • #2
    The S/36 uses so called "flat files", meaning the definition of the fields/columns is not associated with the file. Therefor each program must define the fields. Naturally this is a source of error. Also, it's not necessary to define all the fields in a record, only those you use. Consequently you will need to review all programs to get a complete understanding of the record layout for each file.

    To make things even more interesting, it was common practice to have multiple formats in a file. Typically there was a character or three that identified the "record type" and hence what the layout is. For example, there could be an "account" file containing data formatted one way for "savings", another way for "checking", and a third way for "money market", perhaps indicated by "S", "C", or "M" in position 1 (not that there's anything intrinsically special about position 1). You'll have to examine the programs.

    I've located an IBM BASIC manual from that era. It's not for a S/36 but it should help. See the FORM statement.



    Depending on the reporting options available with your S/36 software, an alternative may be to generate reports and process the spool files.

    Comment


    • #3
      Oh I grew up on the S/36 so I know all about the wonderful file layouts. We are just trying to find a way to get the files off. Our first thought was, as you suggested, to create spool files and copy them to some sort of flat file. Then we might be able to FTP them to our system and manipulate the data. We have a meeting next Wednesday to start playing!! :-)

      Thanks for the link Anything helps!!!!!!

      Comment


      • #4
        I would write programs for each file. Since the files are program-described, there's no way the system can know the layouts -- but you can write a program that knows the layout, and it could then write the output into a CSV file or similar that could be imported into another database system. You'd have to write a separate program for every file, of course... this is the drawback of staying with program described files -- but it shouldn't be an insurmountable task.

        Comment


        • #5
          Hey Scott. Yeah that was kinda where we were going but since I was told the files are also store in S36 Basic format, I'm not sure what that is. I know regular S36 files but Basic files? Have you ever heard of such?

          Comment


          • #6
            No, I have never worked with Basic on S/36.. didn't know they had different files.

            Comment


            • #7
              Scott...

              Me either. My supervisor and I are going tomorrow (Wednesday) to see the lay of the land. Will let you know what we find out. As always, thanks for the help and suggestions!!!

              Comment


              • #8
                While it's possible BASIC has unique data formats in files I suspect it uses the same formats as RPG & COBOL: character, zoned, packed, and binary with the difference being how each language defines the buffer.

                So BASIC:

                Code:
                25  READ FILE USING 30 'FILEA', A$, G, M
                30  FORM X25, C, X10, NC7, PD3
                Is equivalent to something like this:

                Code:
                FFILEA     IF    etc...
                IFILEA          NS
                I                              1    25   FILLER1
                I                             26    26   CHAR1
                I                             27    36   FILLER2
                I                             37    43 0 NUM1
                I                       P     44    46 0 NUM2
                C                     READ FILEA
                Or this:

                Code:
                WORKING-STORAGE SECTION.
                01 FILEA.
                   05 FILLER1      PIC   X(25).
                   05 CHAR1        PIC   X.
                   05 FILLER2      PIC   X(10).
                   05 NUM1         PIC   S9(7).
                   05 NUM2         PIC   S9(5) COMP-3.  (or is it COMP-2, I forget)
                Explanation of BASIC:

                Code:
                25  READ FILE USING 30 'FILEA', A$, G, M
                30  FORM X25, C, X10, NC7, PD3
                Line 25 instructs: read 'FILEA' and load variables "A$" "G" and "M" from the buffer described on line 30

                Line 30 describes a buffer: 25 bytes of filler, 1 byte character, 10 bytes filler, 7 bytes zoned numeric, 3 bytes containing a 5 digit packed number.

                Comment


                • #9
                  Thanks!!! That is going to come in handy I believe.

                  Comment


                  • #10

                    OS/400 V3R1 BASIC (1994)


                    I was searching for something unrelated to computers but it happened to have the word "basic" in it. Presto! This shows up. Google outsmarted themselves!

                    Comment


                    • #11
                      Ha!! But guess what... we were digging through some notebooks under a table at the client site yesterday (searching for the file layouts) and ran across the actual IBM S36 Basic manual. We have a hardcopy!!!! And we found some documentation for the file layouts on file layout spec sheets from 1987!!!! See attached.
                      Attached Files

                      Comment

                      Working...
                      X