On the subject of file transfers, this is what I have been doing for a while now.
I use SEU to create SQL scripts in source members (old-fashioned, you know), and then run them with RUNSQLSTM.
1. Use SQL to create a work file in QTEMP.
2. Use CPYTOIMPF to copy the work file to a CSV file in the IFS.
3. use SNDSMTPEMM to send the CSV file to my company email address.
-- Show accounting dates for CO's in JE batches.
CREATE OR REPLACE VARIABLE SJL.$$EDTN1 CHAR(20) DEFAULT( '00251249');
CREATE OR REPLACE VARIABLE SJL.$$EDTN2 CHAR(20) DEFAULT( 'xxxxxxxx');
CREATE OR REPLACE VARIABLE SJL.$$EDTN3 CHAR(20) DEFAULT( 'xxxxxxxx');
CREATE OR REPLACE VARIABLE SJL.$$EDTN4 CHAR(20) DEFAULT( 'xxxxxxxx');
DROP TABLE QTEMP/CO_BEGFYPD ;
CREATE TABLE QTEMP/CO_BEGFYPD
( XXCO , CCDFYJ , CCPNC , GLDATE )
, CCDFYJ , CCPNC
, JDEDATE( CCDFYJ )
ON VNCO = CCCO
WHERE VNEDTN in ( SJL.$$EDTN1
Order by 1
) with data ;
-- Copy to IFS
CL: ?CPYTOIMPF ??FROMFILE(QTEMP/CO_BEGFYPD)
-- E-mail the files:
CL: ?QSYS/SNDSMTPEMM ??RCP((SLANDESS@xxxxxxx))
??SUBJECT('CO Beginning FY and Period')
??NOTE('CO_BEGFYPD = CO Beg FY and Current Period ')
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.