Midrange News for the IBM i Community


Posted by: Chris Proctor
Programmer Analyst
Columbia Sports Company
Portland, OR
QDLS folder question
has no ratings.
Published: 17 Sep 2015
Revised: 18 Sep 2015 - 585 days ago
Last viewed on: 24 Apr 2017 (1327 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

QDLS folder question Published by: Chris Proctor on 17 Sep 2015 view comments(6)

Good afternoon. I have an issue where some of our reports that get emailed via SNDDST are no longer working. The files are first copied to QDLS/TMP using CPYTOIMPF and then the SNDDST command emails the file as a *DOC. I hate using QDLS, but is there any other way to do it if I'm copying the file to the IFS as a *PCASCII file? I was under the impression that *DOC types always have to be copied to the QDLS directory.

I'm hoping there's something new in V7R1 that might help me to eliminate the need to use this directory. Any suggestions would be appreciated. Here's  the code, if you would like to look at it. Thanks!

RTVSYSVAL SYSVAL(QTIME) RTNVAR(&SYSTIME)

CHGVAR VAR(&DOCNM) VALUE('GL' *TCAT &SYSTIME *TCAT '.CSV')

CHGVAR VAR(&TOSTMF) VALUE('/qdls/tmp/' *TCAT &DOCNM)

CPYTOIMPF FROMFILE(QTEMP/CSC117P) TOSTMF(&TOSTMF) STMFCCSID(*PCASCII) +

MBROPT(*REPLACE) RCDDLM(*CRLF) STRDLM(*NONE) RMVBLANK(*BOTH) +

ADDCOLNAM(*SQL)

CHGDOCD DOC(&DOCNM) FLR(TMP) DOCD('SODA Sales G/L Posting Report')

CHGVAR VAR(&MSG) VALUE('The SODA Sales G/L Posting Report that you +

requested is attached.')

SNDDST TYPE(*DOC) TOINTNET((&EMAIL1) (&EMAIL2) (&EMAIL3) (&EMAIL4) +

(&EMAIL5)) DSTD('SODA Sales G/L Posting Report') MSG(&MSG) +

DOC(&DOCNM) FLR(TMP)

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: QDLS folder question
Posted: 1 years 7 months 8 days 22 hours 1 minutes ago
Edited: Thu, 17 Sep, 2015 at 17:21:44 (586 days ago)

I would use SQL Query File and SENDMAIL instead.

RUNSQLF SQL('select * from CSC117P') OUTPUT(*CSV)
SENDMAIL TO(&EMAIL1 &EMAIL2 &EMAIL3) SUBJECT(&SUBJECT)
                   ATTACH('/home/cozzi/csc117p.csv')
Posted by: Ringer
Premium member *
Comment on: QDLS folder question
Posted: 1 years 7 months 8 days 6 hours 35 minutes ago

http://www.rpgpgm.com/2014/07/formatting-email-body-in-sndsmtpemm.html

Posted by: chrisp
Premium member *
Portland, OR
Comment on: QDLS folder question
Posted: 1 years 7 months 8 days 4 hours 6 minutes ago

Hi Bob

I don't seem to have either of those commands. Where can I find those? It looks MUCH cleaner too!

Thanks!

Chris

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: QDLS folder question
Posted: 1 years 7 months 8 days 3 hours 1 minutes ago
Edited: Fri, 18 Sep, 2015 at 12:20:53 (585 days ago)

Those are SQL Query File commands

2COZ-QF2 

the SNDSMTPEMM command is a fun alternative to SNDDST but just as annoying

Posted by: chrisp
Premium member *
Portland, OR
Comment on: QDLS folder question
Posted: 1 years 7 months 8 days 2 hours 2 minutes ago
Edited: Fri, 18 Sep, 2015 at 13:33:08 (585 days ago)

Hi Bob

I just Googled the number and it appears it a product of yours, correct?

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: QDLS folder question
Posted: 1 years 7 months 8 days 1 hours 33 minutes ago
Edited: Fri, 18 Sep, 2015 at 14:08:02 (585 days ago)

 Yep it is. And that's good to know (the google thing).

www.sqlQueryFile.com