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
which program rpg or cl is efficent to update a transaction onto a database file and why ?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
What is ment by record level identifier?
1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?
what is the use of sflnxtchg?
How to write record if no field or the field are different in physical file in rpgle ?
can I touch the array during treatments?
what is an online rpg?
Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
What is the purpose of record level identifier?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
what do you mean by an input subfile, what are the keywords required?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
How would display prime numbers using CL program?