I have some doubts on subfile-----------
-----I wrote a prog on subfile to display the records.
Every thing is clear but i defined a field
called "opt" as
input field in subfile record format
from that input field i wish to enter into new
screen called "EDIT"
which i created it as a separate RCD in display
file. i gave opt as 2 for edit just like in WRKMBRPDM screen
please telll me the code and
how can i code for it in RPG.
Answers were Sorted based on User's Feedback
Answer / sachin
EQ
READC SFLRCD 90
*IN90 DOWEQ *OFF
OPT COMP 2 SR100
ENDDO
SR100 BEGSR (TO DISPLAY NEW RECORD FORMAT )
*IN12 DOWEQ *OFF
EXFMT RCD1
|
|
|
ENDDO
I TINHK ABOVE STUFF IS ENOUGH FOR U TO UNDERSTAND THE LOGIC
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / abhishek kumar
Use CSRLOC keyword to select the particular record. Once u
get the record, do what ever u want to do (e.g edit, etc)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / guest
Asyou gave option edit, you have changed the existing
recore, so do,
Readc SFLRCD;
when option ='Edit'
move the diplay file fields to the database field.
Do chain on the basis of key to database file (to read and
lock record for update)
Update File rcdfmt;
Update SFLRCD;
Is This Answer Correct ? | 0 Yes | 2 No |
How do I link an existing logical file to it's Physical File without recompiling?
3. Given the DOS Specification below and the following information: • Indicator 50 is off • No records have been written to the subfile What will be the result if the EXFMT operation code is performed on the record format CTLR? A R SUBFL A DESCRIP 101 6 1ODSPATR(UL) A DFT(’NOT FOUND’) A R CTLR SFLCTL(SUBFL) A N50 SFLDSP A SFLDSPCTL A SFLINZ A 67 SFIJEND A SFLSIZ(13) A SFLPAG(12) A ACCOUNTNO 100 S 10 a.) Only AccountNo will display b.) SUBFL will be initialized with 13 blank records c.) An I/O exception error will occur d.) The screen will display 12 records with ‘NOT FOUND’
Can a run time array be declare like below with no specified number of elements ? Is it possible ? DFLD_ARRAY 7 DIM() INZ(*blanks) What does this mean ? Does this mean that the number of array elements will be dynamically declared during run time ?
How can i keyed a flat file in RPGLE
2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY directives? a.) No difference, they function the same b.) ACOPY cannot be used as a conditional directive c.) IINCLUDE files cannot contain embedded SQL d.) Nesting /TNCLUDE directives is not allowed
please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?
difference between 1:%found and %equal built function in detail with example .
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
1. Which Built-In-Function will you use to achieve the following functionality? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2++÷ResultLenDHHiLoEq C QTY IFLT *ZERO C QTY MULT -1 QTY C ENDIF a) %ABS b) %TRIM c) %TRIMS d) %UNS
Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?
Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?
can we perform CHAIN operation on Subfile record format....?