Solved

SNDDST and CRTCSVSTMF command in CL pgm

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
CWBX .NET Message Queue 9 297
Restoring V6R1 Data to V5R4? 4 207
AS400 CPU allocation 3 85
RPG Free Parital key and move replacement 3 90
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
A procedure for exporting installed hotfix details of remote computers using powershell
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now