Solved

SNDDST and CRTCSVSTMF command in CL pgm

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 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