OT: AS/400 its not so bad (was Porting Python to non-pc platforms (AS/400))

Jay Graves JGRAVES3 at austin.rr.com
Thu Feb 24 10:10:27 EST 2000


Warren Postma wrote in message ...
>My father in law has an AS/400 at his place of business, and I wouldn't
mind
>being able to script him up some stuff on AS/400 using Python. I sure as
>Heck am not going to learn RPG!  RPG makes even COBOL look nice. ;-)

RPG has changed quite a bit over the years.  Its now much more frlendly.
Indicators are mostly gone (replaced by IFs) but the column requirements are
still mostly there.  I wouldn't want to write a compiler in it but for what
it does (DB and business logic) is very usable and fast.

>What a foreboding environment that is.  Without so much as a recognizeable
>command shell on this system, I have a hard time doing anything.

AS/400 programmers say the same thing about unix shells.  (-:  The 400 has
promptable commands which is a very nice feature.  type a command and hit F4
and you will get a screen that has all the command arguments as input fields
with their defaults filled in.  Hitting the 'help' key about anywhere gives
you extended, hyper-linked and searchable help (like man pages). The command
naming is very intutive also once you know the rules.  command usually take
the form of 'verb + obj'
some verbs:
wrk = work with
crt = create
dlt = delete
dsp = display

some objects (nouns)
pgm = program  (often prefixed with the type of program (ie RPG))
splf = spooled files
msg = messages
outq = output queue
jobq = job queue

once you get the basics (wrkactjob, wrksplf, dspmsg, crtrpgpgm) you can 'mix
and match' verbs and objects to see if the command exists.  several times i
have used a command with out explicitly knowing that it existed beforehand
just by typing what seemed appropriate.  This does not mean that the 400
will accept any verb/noun combo, they are all prebuilt.  but they are ALL
named consistently so once you 'get it' you can find your way around easily.
once you find out about a new 'noun' you can be assured at least some of the
verbs you know from before will allow you to manipulate it.

The AS/400 has many technological features that make it stand out also.  The
high points are here
http://www.as400.ibm.com/overview/tour2des.htm


>With the disclaimer that I know nothing about AS/400s, and I only
>occassionaly have access to one, I am also interested in putting Python on
>an AS/400.
Thanks for chiming in and being gracious about a 'foreign' computer.
Different does not always equal bad and I hope that this post sheds some
light on the 400 for the uniniated. I don't know if you caught the earlier
parts of the thread but JPython will probably the first attempt at Python on
the 400.  I don't know how old the 400 you have access to is, but you need a
fairly recent copy of the OS  (4.2 or greater) to have a usable Java.
As I get time to work on this, I'll be posting to the group.

Thanks...
Jay





More information about the Python-list mailing list