× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Here is a snippet of code: When I do not zip the file, the attached file is
also not readable.

*chgvar* &applicatn 'FTPERROR' /*
5042 */

*chgvar* &applicatn2 'EMAIL' /*
5042 */

*chgvar* &subject '* FTFTP00C failed to do FTP
transaction' /* 5042 */

*chgvar* &note 'Please review the attached joblog for
the errors' /* 5042 */

DSPJOBLOG OUTPUT(*PRINT) /*
5042 */

DLTF FILE(QTEMP/SPLF) /*
5042 */

*monmsg* cpf0000 /*
5042 */

CRTPF FILE(QTEMP/SPLF) RCDLEN(133) ACCPTHSIZ(*MAX1TB)
SIZE(*NOMAX) +

/*
5042 */

CPYSPLF FILE(QPJOBLOG) TOFILE(QTEMP/SPLF)
SPLNBR(*LAST) /*
5042 */



CPYTOIMPF FROMFILE(QTEMP/SPLF) TOSTMF('/tmp/ftftp00c.txt')
MBROPT(*REPLACE) +

STMFCCSID(*PCASCII) RCDDLM(*CRLF) DTAFMT(*DLM)
STRDLM(*DBLQUOTE) +

/* 5042 */



/* CPYTOARCF FROMFILE('/tmp/ftftp00c.txt')
TOARCF('/tmp/ftftp00c.zip') /* 5042 */



RTVMBRD FILE(QTEMP/SPLF) DTASPCSIZ(&SIZE) /*
5042 */

*chgvar* &size (&size / 1024) /*
Kb 5042 */

*chgvar* &size (&size / 1024) /*
Mb 5042 */



*if* (&size > 10) then(do) /*
5042 */



QSH CMD('jar cfM /tmp/ftftp00c.zip
/tmp/ftftp00c.txt') /* 5042 */

*chgvar* &attach1 '/tmp/ftftp00c.zip' /*
5042 */

*chgvar* &content1 '*ZIP' /*
5042 */

*chgvar* &fileType1 '*BIN' /*
5042 */

*enddo* /*
5042 */

*else* do /*
5042 */

*chgvar* &attach1 '/tmp/ftftp00c.txt' /*
5042 */

*chgvar* &content1 '*PLAIN' /*
5042 */

*chgvar* &fileType1 '*TXT' /*
5042 */

*enddo* /*
5042 */



*CALL* PGM(SYREMLC) PARM(&APPLICATN &APPLICATN2
&SUBJECT &NOTE &ATTACH1 +

&CONTENT1 &FILETYPE1 &ATTACH2 &CONTENT2
&FILETYPE2 &ATTACH3 +

&CONTENT3 &FILETYPE3) /* 5042 */



On Mon, Sep 21, 2020 at 11:49 AM Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

Darryl, is that a typo on the CPYTOIMPF command in number 4 - otherwise,
it does look OK.

QShell does have some assumptions about CCSID, but that should not
affect the JAR command.

Regards
Vern

On 9/21/2020 9:33 AM, a4g atl wrote:
I have used this successfully on previous releases but am now stuck with
this issue. I do the following:
1. DSPJOBLOG *PRINT
2. CRTPF SPLF RCDLEN(133)
3. CPYSPLF to SPLF
4. CPYTOIMPF SPLF to /tmp/joblog.txt stmfccsid(*STDACII) *CRLF
5. QSH JAR cfM /tmp/joblog.zip /tmp/joblog.txt
6. email the zipped file to myself

I get the email and can open the zip file, but now get the tmp folder and
not the zipped file.

When I open the zipped file, the file has garbage as if the data was not
converted to ASCII.
Using the shares I create to the IFS:
I can open the joblog.txt using windows explorer and notepad++ and its
good.
I open the zipped file using windows explorer using Open, and I get
errors
and an unreadable file.

This system is on v7.2.

What am I doing wrong?

TIA, Darryl Freinkel

--
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,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

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.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.