Solved

SNDDST and CRTCSVSTMF command in CL pgm

Posted on 2004-09-08
3
1,019 Views
Last Modified: 2012-08-13
Dear Sir,
I need to send the data from AS/400 to excel file thru e-mail.
How to create one pgm to cater 2 requirement?
That is physical file consist of 4 information
(product code, description,invoice and quantity).
One customer need to show 4 information in the excel file,
another customer need to show 3 information.
Thanks & regards.
My pgm as below:
  PGM
  CLRPFM     FILE(MYPW002)
  CALL       PGM(MYPW002)  
  ADDLIBLE   LIB(DBG400)
  CRTCSVSTMF SOURCE(MYPW002) +                  
               TARGET('QDLS/TEMP/MYPW002.CSV') +
               COLHDG(*COLHDG) RPLFLDDEL(' ') +  
               STMFCODPAG(*PCASCII)          
  RMVLIBLE   LIB(DBG400)
  SNDDST     TYPE(*DOC) TOINTNE((skchow@hotmail.com)) +
               DSTD('stock report') MSG('Customer Report')+
               DOC(MYPW002.CSV) FLR(TEMP)  
  ENDPGM
0
Comment
Question by:skchow2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
daveslater earned 125 total points
ID: 12016100
Hi
why not pass a parm to  MYPW002

CALL       PGM(MYPW002)  parm(&Option)
PGM MYPW002 will then set this option to either 3 fields or 4 fields.

then the CRTCSVSTMF can be conditioned to convert the required file.



Dave
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The conference as a whole was very interesting, although if one has to make a choice between this one and some others, you may want to check out the others.  This conference is aimed mainly at government agencies.  So it addresses the various compli…
We take a look at some of the most common obstacles that IT teams run into as they work relentlessly to keep all the alarms and sirens from going off at once.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question