|
Mike, We devised a method using a combination of a break message handler, CPYTOIMPF, and STRPCO/STRPCCMD. Outline of process: <clp1 - prompt data> 1. User is prompted for what to extract. 2. Create a message queue. 3. Set a break message handler for new msgq to pgm clp3. 4. Submit build data pgm clp2. <clp2 - build data> 1. Extract data. 2. Copy IFS template file (this file contains column name headings for Excel) to the users /HOME directory. Make sure /HOME is shared via Netserver and the user has access rights. 3. CPYTOIMPF your extracted data to the copied template file (*Add). 4. SNDBRKMSG to the temp MSGQ created in clp1. <clp3 - initiate excel job> 1. Break message handler fires on the users' session once the batch build program completes. 2. STRPCO 3. STRPCCMD PCCMD('"C:\...\EXCEL.EXE" "//netservername/HOME/username/filename.csv"') PAUSE(*YES) 4. Cleanup export file, messageQ, etc. When Excel pops up on their display, they should immediately "Save As" to make a local copy (if they need to save it.) The PAUSE(*YES) could be replaced by a short wait (20 seconds should be enough to start excel and retrieve the data from the AS400) so the user can get right back to their greenscreen session. hth, Eric DeLong Sally Beauty Company MIS-Project Manager (BSG) 940-898-7863 or ext. 1863 > -----Original Message----- > From: Wills, Mike N. (TC) [mailto:MNWills@taylorcorp.com] > Sent: Wednesday, August 14, 2002 4:29 PM > To: Midrange - Midrange-L (E-mail) > Subject: Sending a user results of a query > > > I am looking for ideas here. On our system we want a couple > remote users to > run a query. We don't want them to be able to change it, but > be able to run > and have it print. The problem... it is over 300 characters > wide :-(. The > other thing, not as big of a problem, is we have to allow > them to run it > through Lawson, not the green screen. I can do this if it is > done through a > simple call. > > One solution I thought of was to send a CSV file. But I don't > know how the > system can automatically create one, and how do they get the > file? I could > email it. But I don't know how to do that either. > > Mike Wills > IT Corporate Support > Taylor Corporation > mnwills@taylorcorp.com > Phone: (507) 386-3187 > > _______________________________________________ > This is the Midrange Systems Technical Discussion > (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l > or email: MIDRANGE-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. > >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.