On Aug 11, 2022, at 11:02 AM, Stephen Landess <steve_landess@xxxxxxxxxxx> wrote:
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 ')
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.