Posts

Showing posts with the label CL

AS/400 fans only : How to send a DB2 file per Email as CSV attachment

Image
#IBMiSample A simple CMD and CLP to send a DB2 file as CSV attachment.                                                                            /************************************/  SNDCSV.CMD              CMD        PROMPT('Send DB2 file as CSV attachm.') /* COMMAND PROCESSING PROGRAM IS: SNDCSVCL */              PARM       KWD(SNDFIL) TYPE(*CHAR) LEN(10) MIN(1) PROMPT('DB2 +                           file to send as CSV')              PARM       KWD(LIBR00) TYPE(*CHAR) LEN(10) PROMPT('Library') +                   ...

IBMi (AS400) fans only : RPG Free. Minimalist program with a single video format

Image
  #IBMiSample Remember that you need my CLANA00F file to compile the following program. So, f irst of all look at this post and compile and populate these files to use this example. A01ARPCL.CLP              PGM                                                              DCL        VAR(&PPCCL0) TYPE(*DEC)   LEN(7 0)                    DCL        VAR(&PPEXIT) TYPE(*CHAR)  LEN(1)                      DCL        VAR(&OUTPU1) TYPE(*CHAR)  LEN(1)                      DCL        VAR(&OUTPU7) TYPE(*CHAR) ...

IBMi (AS400) fans only * How to add/subtract days to a date from CL (CONTROL LANGUAGE)

Image
#IBMiSample This is a CLLE! Compile with: CRTBNDCL PGM(DATEDISPLC) SRCFILE(QCLSRC) SRCMBR(DATEDISPLC) DATEDISPLC.CLLE /**************************************************************/ /* add/subtract days to a date                                */ /* Try with: CALL DATEDISPLC PARM('270219' X'0000005F')       */ /**************************************************************/              PGM        PARM(&DATE &DISPLACEM)                                   DCL        VAR(&DATE) TYPE(*CHAR) LEN(6)                            DCL        VAR(&DISPLACEM) TYPE(*DEC) LEN(6 0)             ...

IBMi (AS400) fans only * HOW TO GET CURRENT TIME FROM CL (CONTROL LANGUAGE)

Image
#IBMiSample This example gets current time in format HHMMSS.              PGM                                                   DCL        VAR(&TIME) TYPE(*CHAR) LEN(6)              RTVSYSVAL  SYSVAL(QTIME) RTNVAR(&TIME)                SNDPGMMSG MSG(&TIME)                                  ENDPGM                                  

IBMi (AS400) fans only : How to get today's date from CL (Control Language)

Image