MI program MEDIT - Edit numeric variable

This program has been compiled under V3R2
 
 

MEDIT eases the use of the EDIT API's. On later releases we have the built-in functions %editc and %editw, but for those of you who haven't upgraded here it is:

NbrParameterLengthUsage
1Numeric variableAny size and lengthInput
2Number of digitsPacked 2,0Input
3Number of decimal positionsPacked 2,0Input
4Variable typeChar 10Input
5Edited stringChar 80Output
6Edit codeChar 1Input
Optional parameter group
7Edit wordChar 20Input
8Edit word lengthPacked 2,0Input

Variable type can be *BINARY, *PACKED or *ZONED

This program with source is Freeware

Download (2 KB) MEDIT.

To install:

  • create an empty save file on your AS/400
  • start an ftp session and log on to you AS/400
  • set binary transfer mode with the bin ftp command
  • Unzip medit.zip using WinZip
  • put medit.sav to the save file you just created
  • restore MEDIT from the save file to any library. Save library is UTLSYS.
26th February 1999