Hello,
I have a service program which is called thousands of time.
I did set H-SPECS as below
h nomain
h thread(*serialize)
/include qsrc,hspecs
h bnddir('BMS71L_BND')
h alloc(*teraspace)
and added DEALLOC in order to free up memory.
p PR004_getCosto...
p b export
*
* INTERFACE
* ---------
d PR004_getCosto...
d pi *
d p_cazi 3 const
d p_cstb 10 const
d p_cass 20 const
d p_cica 4 const
d p_csog 6 const
d p_tpcos 2 const
d p_dtiv d const
*
* DATA STRUCTURES
d PR004_Costi ds inz
d ds_livello 20
d ds_tprec 3
d ds_lgcass 20
d ds_lgqtcu 12 6
d ds_lgqtcl 12 6
d ds_lgccmpd 40
d ds_lfumtm 2
d ds_lcumft 2
d ds_lfclav 3
d ds_lfines 1
d ds_lfcatg 6
d ds_QtaFab 15 6
d ds_costoUni 12 6
d ds_costoMat 12 6
d ds_costoMan 12 6
d ds_costoExt 12 6
d ds_costoTot 12 6
d ds_pctInd 5 3
d ds_costoInd 12 6
d ds_costoIle 12 6
* STANDALONE FIELDS
d dsCosti s Dim(32767) like(PR004_costi)
d pDsCosti s * inz(*null)
d pDsCosto s * inz(*null)
d i s 5i 0
* CONSTANTS
d APEX C CONST('''')
d COSPL C CONST('COSPL')
d LAVOR C CONST('LAVOR')
/Free
lastIndex = 0 ;
dealloc(n) pdsCosto;
dealloc(n) pdsCosti;
PR004_openfiles();
My problem is that every time I call procedure PR004_getCosto the temporary storage increases even if I DEALLOC memory.
The attached wrkactjob image shows that temporary storage is not 26914M which is huge.
I tried to add RTNPARM value in the procedure interface but I didn't see any benefit.
I would like to know how to handle this memory issue.
best regards,
Giovanni
I have a service program which is called thousands of time.
I did set H-SPECS as below
h nomain
h thread(*serialize)
/include qsrc,hspecs
h bnddir('BMS71L_BND')
h alloc(*teraspace)
and added DEALLOC in order to free up memory.
p PR004_getCosto...
p b export
*
* INTERFACE
* ---------
d PR004_getCosto...
d pi *
d p_cazi 3 const
d p_cstb 10 const
d p_cass 20 const
d p_cica 4 const
d p_csog 6 const
d p_tpcos 2 const
d p_dtiv d const
*
* DATA STRUCTURES
d PR004_Costi ds inz
d ds_livello 20
d ds_tprec 3
d ds_lgcass 20
d ds_lgqtcu 12 6
d ds_lgqtcl 12 6
d ds_lgccmpd 40
d ds_lfumtm 2
d ds_lcumft 2
d ds_lfclav 3
d ds_lfines 1
d ds_lfcatg 6
d ds_QtaFab 15 6
d ds_costoUni 12 6
d ds_costoMat 12 6
d ds_costoMan 12 6
d ds_costoExt 12 6
d ds_costoTot 12 6
d ds_pctInd 5 3
d ds_costoInd 12 6
d ds_costoIle 12 6
* STANDALONE FIELDS
d dsCosti s Dim(32767) like(PR004_costi)
d pDsCosti s * inz(*null)
d pDsCosto s * inz(*null)
d i s 5i 0
* CONSTANTS
d APEX C CONST('''')
d COSPL C CONST('COSPL')
d LAVOR C CONST('LAVOR')
/Free
lastIndex = 0 ;
dealloc(n) pdsCosto;
dealloc(n) pdsCosti;
PR004_openfiles();
My problem is that every time I call procedure PR004_getCosto the temporary storage increases even if I DEALLOC memory.
The attached wrkactjob image shows that temporary storage is not 26914M which is huge.
I tried to add RTNPARM value in the procedure interface but I didn't see any benefit.
I would like to know how to handle this memory issue.
best regards,
Giovanni
Comment