how a varible can be passed to a subfile...accnt1 contain
data in a data area..ie Daccnt1 uds,Daccnt2 3
overlay(accnt1:1),
DNo 4 overlay(accnt1:4)..we want to transfer this dataarea
value from acnt0001 to a subfile..that means to enter each
record we have to incriment account no,,
i normal window we can do
move accnt1 account_no
eval account_no=accnt1
eval no=no+1
exfmt usr_account
how it possible with Subfile????????.Please do answer?
(Thank you for all your answers dear friends!!)

Answer Posted / ajay

I didn`t get your question clearly but below my comments
help you....

As you want subfile to show incremented account number
and as stated in ur question you are fetching initial value
for account number from dataarea accnt1

do n ( n :- subfile page size)
move accnt1 account_no
eval account_no=accnt1
eval no=no+1
write sfl_format
eval rrn=rrn+1 ( rrn :- this is associated with SFL)
enddo
exfmt sfl_ctlfmt

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different opcodes used for file operation on a subfile in a rpg pgm?

1099


WHICH REPLY CODE IS USED BT sftp ? ... (e.g.226 is used by FTP IF FILE IS TRANSFERED)

1720


why is the declare cursor statement is used for?

632


how can you specify no duplicate key?

710


how to write code for singlepage in sqlrpgle with update ?

2367






an access path may be in which sequence?

635


in which specification the report layout can be defined?

982


what is arrival sequence?

1115


how to define global parameter in ile ?

633


Difference Between Source Physical File & Physical File?

642


Difference Between Ca & Cf?

704


what does vldcmdkey means?

819


What is dynslt?

788


how to define to define a hidden filed in dspf ?

783


what is sflrolval?

652