Wednesday, February 10, 2010

Convert date format RPGLE

A variable can be declared as date data type using 'D' in internal data type.






C ....*USA....... MOVE.......Datetemp.....Dat
C .... Dat ...... DSPLY....

Dat declared as 8 D ( date data type with 8 length ) to compact with *USA format

OUTPUT:
======






Character (A)
Graphic (G)
Numeric - Integer format (I)
Numeric – Packed decimal format (P)
Numeric - Zoned format (S)
Numeric - Unsigned format (U)
Float (F)
Date (D)
Time (T)
Timestamp (Z)

Shifting to tn5250

I got another terminal for logging into iSeries from ubuntu through just 'tn5250'. The GREEN screens makes more feeling that I am working in AS400 :-)

This has given by the http://www.rzkh.de/ as400 service administrators

See wiki.

http://en.wikipedia.org/wiki/IBM_5250

Tuesday, February 9, 2010

RPGLE - Concatenate two strings,addition


Simple programs are always helpful to get good step to learn a new language. See below how easy this is to write RPGLE ( am learning from basic ) rather than jumping to big things


INZ keyword is used to initialize the 'surname' and 'forename'. But before concatenating the variables using 'CAT' the valued changed using EVAL opcode.

Addition can be done using 'ADD'.

Arithmetic operations:

http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.ibm.etools.iseries.langref.doc/evferlsh354.htm