Help needed in RPG extension specification

2900 pts.
Tags:
AS/400
ILE
RPG
Hi all,
Unfortunately I have to understand old days code written in RPG2. That code also use Extension specifications which I never used before (as I am programming in ILE). I have searched on net it only refers me to a book written in 79 which contains dull E-specs maps which I don't understand. The only thing which I could understand is that E-specs were used to define arrays and tables. Can you please tell me in easy words what E specs are and why they were used (if there is a little coding example that will be more helpful) or refer me some good site where I could find simple examples of E specs.
Thanks,
1

Answer Wiki

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

One way to help understand is to run CVTRPGSRC against the program source in question which will show you the D spec equivalent and should help clarify what you have.

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.
  • ToddN2000
    True, the E spec was for defining Tables and Arrays. That goes back to the RPG I and RPG II days of code. I'm surprised that it still exists out there. I thought that went the way of coding sheets and printer spacing charts.. If you have an example of it, post it and I'll do my best. Its been over 30 years since I worked with it in college.
    133,800 pointsBadges:
    report
  • ToddN2000
    I don't even think the SEU editor supports the E spec anymore either.
    133,800 pointsBadges:
    report
  • philpl1jb
    There is a lot of stuff that can happen in a small space. If you'll post your e-spec we will help you understand it.
    54,090 pointsBadges:
    report
  • SunilRao
    How to check the table created in E spec.  Its like 
    E TYP 12 12 2 0. 
    E TYP1 12 12 1 0.
    Don't know how to check and in the program(RPG) they used it like 


    Fld Chain File
    Zadd1         I    20
    Fld Lokuptyp,I                 60(indicator)

    *IN60  IFEQ  '1'

    Move TYP1,I     Fld2
    .
    .
    .




    10 pointsBadges:
    report
  • ToddN2000
    @SunilRao: You may want to check out this PDF on the RPG 2 reference manual. It has information on the E-specs and what the columns and locations were used for. And yes they were use for defining tables back in the day (1980) when I first started coding.
    133,800 pointsBadges:
    report
  • azohawk

    The only time I recall writing E-specs was in college many many moons ago. It appears that there are 2 tables, TYP and TYP1, both have 12 records loaded from a table (at the bottom of your code you should see some records beginning in column 1 I believe that the record before the data has ** on it (might be in column 6)  I don't recall if they had to contain CTDATA statement or not, but the 2 records populate the TYP and TYP1. There should be 12 set of data in these two records (no separators) TYP is a 2 digit 0 decimal size, while TYP1 is a 1 digit 0 decimal.

    The E spec appears to say that there are 12 elements per record in fount in the CTDATA, There are 12 elements in the array/table. 

    I is the position in the array table, setting it to 1 indicates the starting point. The Look up begins looking in TYP at I, if it finds a match to field, indicator 60 is turned on and the value at that position in TYP1 is moved to fld2.

    O how I miss RPG II and III--NOT!

    4,055 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: