1) How to retrieve RRN through RPG ?
2) How to pass parameter by value ?
3) How to trap the error through the RPG/400

Answers were Sorted based on User's Feedback



1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / swetha p rao

1. File information Data Strucutre

2. Using Parm

3. Monitor
On-Error *All
Endmon

Is This Answer Correct ?    20 Yes 4 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / zhang

1. in F specification, use RECNO keyword.
2.
3. Use error capture subrountine, *PSSR

Is This Answer Correct ?    6 Yes 2 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / deepu

1.USING SETLL OR CHAIN BY GIVING RRN IN FACTOR ONE,OR
SPECIFY RECNO KEYWORD IN FILE LEVEL.

2.USING CALL AND PARM



3.USING ON-ERROR OPCODE

Is This Answer Correct ?    8 Yes 5 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / vishal

using recno(var) keyword in f spec where var is a variable
to store rrn.

Is This Answer Correct ?    3 Yes 1 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / guest

1 we can retrieve RRN through RPG by SFLRCDRRN along with
dds

3. we can trap the error through the RPG/400 by PSSR, INFDS

Is This Answer Correct ?    5 Yes 4 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / dileep

WE CAN RETRIEVE RRN BY USING INFDS

Is This Answer Correct ?    2 Yes 1 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / kumar

1) using CHAIN OR SETLL
EX : FSAMP IF E DISK
C 5 CHAIN SAMP
FLD DSPLY
EVAL *INLR=*ON

2) Using call and parm


3)Indicators, infds(file information datastructure) *pssr

Is This Answer Correct ?    2 Yes 1 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / sbakshi4

useing below query:

select rrn(a),a.* from Lib_name/File_name a

Is This Answer Correct ?    0 Yes 0 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / prateek

we can pass parameter by value to *PGM object.

Is This Answer Correct ?    0 Yes 5 No

1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the erro..

Answer / girish kulkarni

1) Through CHAIN opcode it is possible , give RRN in Fact1
2) Write the value in Fact2 of Parm Opcode and name of
parameter in result field
3) Through the program status data structure or File
information data structure

Is This Answer Correct ?    4 Yes 14 No

Post New Answer

More RPG400 Interview Questions

We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

0 Answers  


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

0 Answers   HCL,


How to handle duplicate error handling in RPG?

0 Answers  


1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?

4 Answers   Virtusa,


1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from database file.

2 Answers  






How to read a record from file where there is multiple record occurrence is available?

1 Answers  


How can we know running job is batch or interactive?

0 Answers  


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

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 can an indexed file be used as arrival sequence in RPG?

3 Answers   IBM,


Can somebody tell me that, Is it possible to read all the member of PF without OVRDBF?

6 Answers  


How to read alternative records in a pf by using rpg?

8 Answers   IBM,


Categories