Solved

SNDDST and CRTCSVSTMF command in CL pgm

Posted on 2004-09-08
3
1,013 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how in apache config file makes it run php on iseries? 2 447
AS400 Printer emulation Print to PDF 5 949
Installing a Printer on AS400 5 181
Check file/object size on AS400 3 182
Most MSPs worth their salt are already offering cybersecurity to their customers. But cybersecurity as a service is wide encompassing and can mean many things.  So where are MSPs falling in this spectrum?
There's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

832 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