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 update only a field of a PF in an RPG program. I don't want to update the record, only one field.

2 Answers  


I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?

2 Answers  


i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL program

6 Answers  


can we perform CHAIN operation on Subfile record format....?

4 Answers  


what procedure should we use to find whether the following operations are successful or not setll setgt chain read reade readp pls tell with example i'm not lazy to read the manual or not lazy to do anything.but sometimes i cannot understand the things given in manual in high level english its little bit complicated for me,i can't understand their way of writing thats why i ask these questions here and find the solution in simple words that i can understand thats the real reason sir.sorry if i had hurt you or disturbed you.please understand my situation.

5 Answers   iGate,






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

1 Answers   HCL,


what are the types of identifers

2 Answers   IBM,


Suppose you have 3 members in a database file. How to read records from all the members without using CL (OVRDBF) i.e. Entire process should be handled exclusively in a RPG program?

7 Answers  


How to print output from openquery in as400 ?

1 Answers   Four soft,


please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?

4 Answers   HCL,


This is my Physical file 'EMPS' existing in library "TAMIL1" and its record format is 'EMPRCD" a)its source is R EMPRCD ENO 4 0 ENAME 10 EADD 10 b)The records present in EMPS are as follows ENO ENAME EADD 0001 tamil coimbatore 0002 kumar bangalore 0003 sunder bangalore 0004 arunkumar chennai 0005 pandi hyderabad 0006 santhosh hyderabad 0007 sasi salem 0008 kalai chennai 0009 suresh hyderabad 0010 vijay bangalore 0011 Arul chennai 0012 velu chennai 0013 khan bangalore 0014 praba chennai 0015 praba.p coimbatore 0016 anand ooty 0017 raja erode 0018 sankar erode 0019 vadivel namakkal 0020 anbu chennai 0021 Ajith mumabi c)now i want to select the 'ENAME' field records starting with 'S' for that i have created a RPG program its source code is PGM DCLF FILE(TAMIL1/EMPS) DCL VAR(&MYENO) TYPE(*CHAR) LEN(4) OVRDBF FILE(EMPS) SHARE(*YES) OPNQRYF FILE((TAMIL1/EMPS)) QRYSLT('ENAME *EQ %WLDCRD("S *")') READ: RCVF RCDFMT(EMPRCD) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) CHGVAR VAR(&MYENO) VALUE(&ENO) SNDUSRMSG MSG(&MYENO) SNDUSRMSG MSG(&ENAME) SNDUSRMSG MSG(&EADD) GOTO READ END: CLOF OPNID(EMPS) DLTOVR FILE(EMPS) ENDPGM Is this coding correct sir,the program gets compiled,and if i call it it says query running but records are not displayed.please help me out

4 Answers   Virtusa,


When it is desirable to describe files Internally?

0 Answers  


Categories