In single page subfile,if I select the mutiple options in 1
page and without pressing enter,I press rollup key
(pagedown).In such case how I can handle it in rpg becasue
in single page we have to handle it in pgm. It would be
helpful if any one answer with coding
Answers were Sorted based on User's Feedback
Answer / swetha p rao
We can handle this using physical file RRN value.When user
enters some options in the first page and takes a pagedown
Read the changes on the subfile using ReadC ie; read the
option entered for that record and save the physical file
RRN value for that record in a temporary file along with
option (You can get RRN value by declaring File information
data structure for that physical file)
When you load the records in the subroutine bfore writing
the values to subfile ,Chain the temporary file with RRN
value and if the RRn is present in the temporary file move
the corresponding option to the Subfile options.
Check this temporary file evrytime you load the records on
subfile and update this temporary file evry time there is a
chnage on the subfile options.
Clear the temporary file when the user confirms delete or
when user doesnt want to delete.
| Is This Answer Correct ? | 14 Yes | 2 No |
Answer / ashish kashliwal
We can handle this using arrays. When user
enters some options in the first page and takes a pagedown
then read the changes on the sub-file using READC. first
validate the option, if entered options are valid then in
first array store the fields value (through which we can
identify record as unique in sub-file) and in second array
store the option.
Whenever load the sub-file, then first check if subfile
record is in array (with lookup), then write option equal
to second array value and clear the array element. else
display blank option.
Whenever user press enter (suppose user choose one option
in page one and another option on page 3) then process
option through array.
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / sanjib
CEELOCT and CEEDATE are APIs that exist on the system.
You do not need to create them.
In essence, what the CL that I supplied does is:
1) Use the CEELOCT API to convert the current date to
lillian.
2) Then you add or subtract the number of days you need
from the lillian date.
3) Then you use CEEDATE to convert the new lillian date
back to the date format that you wish, in this case, I used
YYYYMMDD.
Current Local Time (CEELOCT), to convert a date to Julian
format. To create this
program, you must use the CRTBNDCL command alone or the
CRTCLMOD
command and the CRTPGM command together.
PGM
DCL &LILDATE *CHAR LEN(4)
DCL &PICTSTR *CHAR LEN(5) VALUE(YYDDD)
DCL &JULDATE *CHAR LEN(5)
DCL &SECONDS *CHAR 8 /* Seconds from CEELOCT */
DCL &GREG *CHAR 23 /* Gregorian date from CEELOCT */
/* */
CALLPRC PRC(CEELOCT) /* Get current date and time
*/ +
PARMS (&LILDATE) /* Date in Lilian format */ +
&SECONDS /* Seconds field will not
be used */
&GREG /* Gregorian field will
not be used */
*OMIT /* Omit feedback
parameter so exceptions +
are signalled
*/
CALLPRC PRC(CEEDATE) +
PARMS (&LILDATE) /* Today’s date */ +
&PICTSTR /* How to format */ +
&JULDATE /* Julian date */ +
*OMIT
ADDPGM LIB1/FILEX MBR(’MBR’ *CAT &JULDATE’)
ENDPGM
| Is This Answer Correct ? | 0 Yes | 4 No |
Answer / guest.
System will take care of it . You do not need to specify
anything for that. Until user does not press Enter key
ReadC won't detect any change record.
First build the file according to the Size/Page. On Page up
load it again . u do not need to worry about the option u
have entered on first page.
| Is This Answer Correct ? | 1 Yes | 18 No |
What is I90(Insure 90)?
Suppose I have 3 jobs a b and c. I want to submit b after successful completion of a and want to submit c after successful completion of b. Without using job scheduler or job queue, how can I do that through cl program?
what are the key words you must use when using a subfile?
How can we override a file during runtime in rpg?
What hapens when we use CPYF command to copy a LF? On which PF will it be dependent???
I am Submitting one job in batch that job calls three progams(PGMA, PGMB, PGMC). PGMB should be called after sucessfully completion of PGMA as like for PGMC also. So Can you please tell me how can we do that (without using data area)
Hi, I am getting the error in RPG (All Record Formats for externally-described file ABCD ignored or dropped due to error; file ignored.) Please suggest any
difference between CHAIN and READE?
suppose i i am changing / updating record of subfile and i want to change the record in reverse order . means i want to change the bottom record first and so on through readc . how i do it please any one explain .
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
How I can reread the physical file in CL program once the end of file reached in same CL program.
i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL program