please guys help me,I need to write a program that shows more
than one way to display a subfile. Both views are of the same
file but sorted differently and show different fields of the
same file when the user presses a function key. send me code

Answers were Sorted based on User's Feedback



please guys help me,I need to write a program that shows more than one way to display a subfile. B..

Answer / guset

You can create two subfile record format.
When press function key then it will show second subfile
record with different fields. but records showing different
manner i mean suppose the file has 15 records. Subfile size
is 5 then first time it will show first 5 if we press
function key then it will show next 5 records with
different field name.

Is This Answer Correct ?    3 Yes 0 No

please guys help me,I need to write a program that shows more than one way to display a subfile. B..

Answer / venkat

by multi-memeber concept we can write as per your requirements

Is This Answer Correct ?    2 Yes 0 No

please guys help me,I need to write a program that shows more than one way to display a subfile. B..

Answer / chandrababu

This Case we can do by using Subfile fold/drop option. for Example F11 function key for Fold/Drop in subfile. see the code below.

FDSPLYFILE CF E WORKSTN SFILE(SFLREC1:@RRN1)
SFILE(SFLREC2:@RRN2)

FDBFILE IF E K DISK
D @RRN1 S 5 0 INZ(0)
D @RRN2 S 5 0 INZ(0)

C EXSR LOAD
C WRITE FOOTER
C DOW *IN03 = *OFF
C 03 LEAVE
C EXFMT CTLREC1
C IF *IN11 = *ON
C EXFMT CTLREC2
C ENDIF
C ENDDO
C EVAL *INLR = *ON
C LOAD BEGSR
C Read DBFILE
C DOW Not %EOF
C EVAL @RRN1 = @RRN1 +1
C EVAL @RRN2 = @RRN2 +1
C WRITE SFLREC1
C WRITE SFLREC2
C Read DBFILE
C ENDDO
C IF @RRN1 > 0 and @RRN2 > 0
C SETON 3031
C ENDIF
C ENDSR

Is This Answer Correct ?    1 Yes 0 No

please guys help me,I need to write a program that shows more than one way to display a subfile. B..

Answer / madan

Please explain what is subfile ??

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the logical files in one RPG program? if yes what i have to d.

5 Answers   TCS,


can anybody help me that what is the procedure of debugging the service program?

3 Answers   CSC,


What is the difference between copybooks and subprocedures in as400?

0 Answers  


check existence of one record without using chain or read?

1 Answers   IBM,


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?

0 Answers  






which MONMSG will give higher priority in CL program? I know MONMSG are of two types. Program Level Monmsg and Command Monmsg?

1 Answers  


how do u find whether a record is locked or not??/

5 Answers   CTS,


Suppose 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?

1 Answers  


How do I read records from Subfile? what is the purpose of READC explain with example?

4 Answers   IBM,


what is post opcode do

1 Answers   CTS,


How Chain operation copies the record's data to the input buffer for the program?

0 Answers   IBM,


parameters cannot be passed in which one??

2 Answers   CTS,


Categories