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
READC SFLRCD 90
*IN90 DOWEQ *OFF
OPT COMP 2 SR100
SR100 BEGSR (TO DISPLAY NEW RECORD FORMAT )
*IN12 DOWEQ *OFF
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,
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;
|Is This Answer Correct ?||0 Yes||2 No|
Delete FileName at first statement in RPG.
If the last record of a file has been read, and the next operation on that file is a READ operation, what will be the values of the input fields for that file? A. They will be blank and/or zero. B. They will be null. C. They will equal the values of the first record in the file. D. They will equal the values of the last record read.
i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.
suppose if we want to update the data in cl what we will do?
1.Write code to read the records from a file and load an array of size 99? Make sure that you take care of all the error conditions?
In how many ways a session/device error occurs,,, and what is the remedy for it?
We have a Physical file, after reading 5 records,it has to read LF of that same Physical file,Will it start reading from Ist record or will start reading from 5th record?
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
Hi, Can anybody give me real sinario for SFLRCDNBR?with example?
Can we create 300 logical files based on a single physical file using the CRTLF command only once?.
1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?
Can anybody tell me, does CL/400 handle LEVEL check while running the CL program....? plz share your experience...