what is overlay? how can we pass parameters in cl or rpg
programing? how can we get data area value in cl or rpg
programming?

Answer Posted / radha sammangi

1)
overlay : This is keyword which is used for overlays the storage of one subfield with another subfield in a data structure.

Ex:

D Datastructure DS
D Fullname 15a
D Firstname 6a OVERLAY(Fullname)
D Middlename 5a OVERLAY(Fullname:7)
D Lastname 4a OVERLAY(Fullname:12)

Even we can use OVERLAY(Fullname :*NEXT) instead of positions.

2) CALL PGM(program name) PARM(A B C....) in CL

CALL 'Pgmname' Plist /*In RPG

Plist KLIST
PARM A
PARM B
PARM C

3)
RTVDTAARA in CL

RTVDTAARA DTAARA(DA1) RTNVAR(&Var)

We can use IN and OUT operations for reading and writing data area in RPG programs.

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1481


how can I tell when to replace the array?

871


how do I play {insert rpg system here}?

764


what is file information data structure?

1717


If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

809






are there any useful c runtime apis that I can call from rpg iv?

875


What is ment by record level identifier?

823


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

1656


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

2375


What is file identifier where we can use?

817


do you use message subfiles? What are the necessary keywords required coding a message subfile?

876


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

960


When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

706


what is *place and *auto keyword in prtf ?plz explain

2907


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

689