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 |
can any body correct the following code? Following a procedure which returns the maximum of two numbers.Correct the following code. P GETMAX B D GETMAX PI D NUM1 35 0 D NUM2 45 0 C IF NUM1 > NUM2 C RETURN NUM1 C ELSE C RETURN NUM2 C ENDIF P GETMAX E
Can somebody tell me that, Is it possible to read all the member of PF without OVRDBF?
How to declare the more than one file in cl/400.
What is the RPG cycle?
ESCAPE message sent by child program can be handled by parent program using which keyword?
How can we know running job is batch or interactive?
how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.
How to handle duplicate error handling in RPG?
How can i keyed a flat file in RPGLE
why subproc not run in dftactgrp?????/plz explain
what is batch debug in as400?
Difference between creating a report using Printer file and WRKQRY(Query Report) ?