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
Answer Posted / 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 |
Post New Answer View All Answers
what is the rpg system?
what are the key words you must use when using a subfile?
how do I declare a table or array in rpg iv?
How can we know running job is batch or interactive?
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
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?
can you debug ile rpg program using isdb?
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
what was the robotech rpg?
How to select highest score of each subject or how to select highest income of every month?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.
explain sflclr, sflend, sfldlt, and sflcsrrrn?