We have been taught that we should use byreference() function to pass pvs from p

We have been taught that we should use byreference() function to pass pvs from process to process. This saves memory. As it relates to a CDT, we are being instructed not to pass a CDT to a sub process as a byreference() function. 1. Why is this? 2. If we do not use byreference() then additional memory will be used in the sub process - this defeats the memory savings.
After reading on the forum it seems that many will create a CDT with many fields in them and then processes using the CDT will only use some of the fields. If you create a CDT specific for a process, wouldn't it make send to pass the CDT to the sub processes as a byreference()?
Keith...

OriginalPostID-83512

OriginalPostID-83512

  Discussion posts and replies are publicly visible

Parents
  • Are you saying that the memory savings is now not as important? We have what is called a parent process that then calls the worker task process where all the tasks live and this sub will archive in 30 days. When a process is started the calling to the sub process is rather immediate. With this use case, I do not think a byreference call to this sub process is an issue. I agree, if we have another sub process call later that uses a CDT that has been changed, we could have an issue.
    Even if you do not byreference, passing a CDT to a sub process will cause an issue if the CDT in the sub process does not match the same CDT version of the calling process. How do you deal with this scenario??? It seems your still doomed to have an error for longer running processes that call a sub process.
Reply
  • Are you saying that the memory savings is now not as important? We have what is called a parent process that then calls the worker task process where all the tasks live and this sub will archive in 30 days. When a process is started the calling to the sub process is rather immediate. With this use case, I do not think a byreference call to this sub process is an issue. I agree, if we have another sub process call later that uses a CDT that has been changed, we could have an issue.
    Even if you do not byreference, passing a CDT to a sub process will cause an issue if the CDT in the sub process does not match the same CDT version of the calling process. How do you deal with this scenario??? It seems your still doomed to have an error for longer running processes that call a sub process.
Children
No Data