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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / vicky

we can also use overlay on subfile

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

Hi, I am getting the error in RPG (All Record Formats for externally-described file ABCD ignored or dropped due to error; file ignored.) Please suggest any

2 Answers   Satyam,


How to check which are the pgms using 1 perticulate file.? I know there is many tool available for X-reference...but need to know is there any command available in the system...?

4 Answers   IBM,


Can anybody tell me the setps to create .csv file in IFS folder on AS/400. I also need to know how I can send this .csv file to PC in xls sheet.....?

2 Answers  


How can we access Interactive job LDA in Batch Job?. and How we can access a file in interactive QTEMP lib in Batch job?.

4 Answers   IBM,


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

0 Answers  






How I can reread the physical file in CL program once the end of file reached in same CL program.

20 Answers   IBM,


1. Which Built-In-Function will you use to achieve the following functionality? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2++÷ResultLenDHHiLoEq C QTY IFLT *ZERO C QTY MULT -1 QTY C ENDIF a) %ABS b) %TRIM c) %TRIMS d) %UNS

3 Answers   IBM,


Assume my file has 100 records and I want to see only first 10 records. Is this possible through lf?

1 Answers  


How can we override a file during runtime in rpg?

0 Answers  


Hi, Can any body tell me ur experience on this questions? Questions: 1.what is the use of SFLRCDNBR other than subfile page display? 2.Which of the following operation cannot be used in conjuction with a file coded as device type disk?

1 Answers  


I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic

2 Answers  


how we create binder member for updating service program and where we type this code on command line or in program ? strpgmexp pgmlvl(*current) export symbol (xyz0 endpgmexp. plz explain me this step by step .

2 Answers  


Categories