Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


SNDDST and CRTCSVSTMF command in CL pgm

Posted on 2004-09-08
Medium Priority
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:
  CALL       PGM(MYPW002)  
  CRTCSVSTMF SOURCE(MYPW002) +                  
               TARGET('QDLS/TEMP/MYPW002.CSV') +
               COLHDG(*COLHDG) RPLFLDDEL(' ') +  
  SNDDST     TYPE(*DOC) TOINTNE((skchow@hotmail.com)) +
               DSTD('stock report') MSG('Customer Report')+
               DOC(MYPW002.CSV) FLR(TEMP)  
Question by:skchow2001
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
LVL 14

Accepted Solution

daveslater earned 500 total points
ID: 12016100
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.


Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

618 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