Posts

Showing posts from June, 2021

IBMi (AS400) fans only ' Minimalist Subfile with filter fields

Image
#IBMiSample First of all please refer to  this post  to compile and populate the necessary files for this example. Then, compile the following sources: OT08SF.DSPF for the display file and OT08SF.SQLRPGLE for the RPGLE program. Display File: OT08SFV.DSPF                                             CHGINPDFT(CS UL HI)                                             INDARA                                             CA03(03 'F3=EXIT')                                             REF(OTORD00F)       *--------------------------------------------------------------                 R SFL1                      SFL       *--------------------------------------------------------------                   S1OPT          1A  B  6  2                   S1ANN0    R             +3REFFLD(OTANN0)                   S1COR0    R            + 1REFFLD(OTCOR0) EDTCDE(Z)                   S1NOM0    R            + 1REFFLD(CLANA/CLNOM0 CLANA00F)       *----------------------------------------------------------

IBMi (AS400) fans only - How to write to the same printerfile from more programs

Image
#IBMiSample A simple way is to leave the file open by ending programs with RETURN instead of SETON LR. Example: Program A calls Program B. Program B opens a printerfile and write some pages in the spool file. Program B closes with RETURN. The printer file is already open. Program A calls Program B again. Program B opens a printerfile (it is already open) and write some other pages on the same spool file. Program B closes with RETURN. The printer file is already open. Program A calls Program B again. Program B opens a printerfile (it is already open) and write some other pages on the same spool file. Program B closes with RETURN. The printer file is already open. ... and so on. At the end, run RCLACTGRP ACTGRP(QILE). This command will end the QILE activation group, it means the spool file will also be closed. I appreciate all the comments made on this blog.