Thursday, 8 August 2013

Open Query(OPNQRY) and Override with Database File(OVRDBF) concept

You can use the Override with Database file (OVRDBF) command to replace the database file named in a CL program or to change certain parameters of the existing database file.
It is not mandatory to use OVRDBF(*Yes) before OPNQRYF. You can still use OPNQRYF without OVRDBF.But here the pupose of the OPNQRYF won't be solved.
Opnqryf creates its own Open data path and to share the same data path in a program we use ovrdbf share(*yes), if we do not use ovrdbf, then program will have its own ODP, so it will read the file from beginning on which query has been run. So, OPNQRYF selected records will have no importance.
So, we need to use CPYFRMQRYF command and put the selected records in to runtime file and use that file to read in program.


Sunday, 14 July 2013

When program1 calls program2 for the first time program2 executes the *INZSR subroutine.Program2 uses the RETRN operation to return to program1.However when program1 call again program2 this time is the *INZSR subroutine executed?


If you specify RETRN in called program, the *INZSR will not execute again.
Reason: The INZSR is used to "initialise" the environment for the execution of your program by setting/resetting variables, etc, however many times it is called. If only return is used, all the values are held in memory anyway, so you don't have to initialize everything all over again. If LR is on at the end, INZSR will be executed again.

Some important Operation in RPGLE

READ  To read the records sequentially.
READE To read the equal key records
READP To read the previous records
READC To read the records from the workstation file (Subfile).
REDEP To read the equal key previous records.




Saturday, 22 June 2013

Difference between Array and Table in AS400

Array: Array is stored any where in the body of the input records.
Table: Table is stored at the beginning of the input records.
Array: We can access all the elements in array by specifying the array name.
Table:  Only one table element can be accessed at a time.
Array:  Array can be searched randomly.
Table:  Table can be searched consecutively. 




How to Convert Spool File into PDF or other Formats and send via Email.

Hi All,
          Here are the steps to convert the Spool file into PDF or any other format and Send Via Email.

1. Please add ESEND library into your library list.
2. Get the Spool File,Job Name,User,Number and Spool File Number for the spool file which you want to convert.(Give option 2 for the spool file you will get all the details).
3. Give command ESNDFILE in the command line and Press F4.
4. Give the email id in the Recipient List do a Page Down and give *File in the type.
5. Press Enter and Check your email....!

Saturday, 4 May 2013

How it works.

Step1: Please register with your update email id and other details in the below post link.

Step2: Get the username and password.

Step3: Download mocha 3270 or 5250.

Step4: Install into your laptop/desktop/iphone/ipad.

Step5: Here we go..it is ready to use.

Get it for free.

Please find the following link for free access of AS400. You Can Register on the following link. After registering you will get a user name and password. You can use the same user name and password for logging into Mocha 3270 or 5250.

http://www.rzkh.de/cgi-bin/db2www/getaccounteng.d2w/main