Home

The Retrieve Program Field Attribute (RTVPGMFLDA) command for IBM iSeries 400 (AS/400)
and Display Program Field Attribute (DSPPGMFLDA) command for IBM iSeries 400 (AS/400)


As the new century approches there are more and more programs suffering from what was 'good practise' ten or twenty years ago: Two Digets for the year.
Two examples came up at Jan 1'st 1999:

This - which is quite OK if the result field was for example 4.0 - gives problems with the shown 2.0-fields. It might not be clear why the first example makes troubels, but what happens is: FROMYY is moved to YY. The 'something' is done and YY is increased by one. First then YY is compared to TOYY to descide wheather to do another loop. If TOYY is 99 then YY at some time is raised from 99 to ... yes, to *ZERO. And as zero is less than 99 the loop will continue forever.
To avoid this problem I had to scan a huge source file for 'DO's and 'ADD 1's. There were many! How could I point out which had a 2.0 result field? Well - I wrote a RTVPGMFLDA command.


The Retrieve Program Field Attributes (RTVPGMFLDA) command for IBM iSeries 400 (AS/400) serves to retrieve type, length and decimals from an internal program field from the compiled program object.The same information can be shown interactively by the Display Program Field Attributes (DSPPGMFLDA).
The prompt for RTVPGMFLDA is:
                  Retrieve Pgm Field Attributes (RTVPGMFLDA)
    
Type choices, press Enter.

Program  . . . . . . . . . . . .    ___________  Name     
  Library  . . . . . . . . . . .     *LIBL______ Name, *LIBL    
Field name . . . . . . . . . . .    ___________  Character value
Return Field Type         (16)      ___________  Character value
Return Field Length      (5 0)      ___________  Number         
Return Decimal Positions (5 0)      ___________  Number         
You can get a free copy of the command you fill the the form.

Highligts

License
Provided that you have got the program directly from me the author you can install and use it on one single iSeries 400 (AS/400) to document programs in any commercial or non-commercial project YOU are working on. You can allow anyone else working on the same project on the same iSeries 400 (AS/400) to use it. You can distribute this text only (the description and my address) to anybody you want if it is not changed. Actually you are invited to do so. No other distribution is allowed. You must remove the utility from machines you will no longer have access to. You are not allowed to sell (alone or as part of a project) any output from this utility.
You are expected within a month after download to send a message with your opinion to the author.
How to get the Retrieve Program Field Attributes for IBM iSeries 400 (AS/400) and the included DSPPGMFLDA
All you have to do is to fill the form. You will then receive the program in few days.

Back
Back to Software Page

Last change date: 20.2.2003. File name: http://hkrebs.dk/rtvpgmflda.html