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

How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...

2 Answers  


what is the equivalent keyword for CHAIN opcode ??

7 Answers   TCS,


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

0 Answers   HCL,


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  


Are all these RPG/400 Interviewed Questions being asked recently? are current?

1 Answers  






Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?

2 Answers  


how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.

4 Answers   iSoft, Wipro,


Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?

1 Answers  


1.What is referential Integrity? 2.What is Foreign Key? 3.What is Transfer Control? 4.What is Free format?

3 Answers  


give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........

0 Answers   CTS,


1..Write an sql query to find the employee name who is having 2 phone numebr? 2.Write an sql query to the the second highest salary of the employee?

4 Answers  


What is the purpose of PUTOVR keyword?

2 Answers  


Categories