× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Check out this thread on the Net.data forum

http://dtwdude.com/index.html?SID=20101206081915314871&NRL=1

Cheers, Peter

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Peter_Vidal@xxxxxxxx
Sent: Wednesday, 8 December 2010 10:11 a.m.
To: web400@xxxxxxxxxxxx; midrange-l@xxxxxxxxxxxx
Subject: [WEB400] How to upload a .txt / .csv file to the iSeries using NET.DATA

Hi list!

I want to be able to simply upload any of the file types specified above, from any place (obviously including the harddrive of the user) into the iSeries. Is there anyone outthere that is doing that and that can share your solution? I just need to know how to do it with CGI/HTML/JS/NET.DATA.

I am currently doing this:

%DEFINE {
DATABASE = "*LOCAL"
DTW_REMOVE_WS = "YES"
SHOWSQL = "NO"
library = "WHDTA"
amflib = "AMFLIB1"
PCFILE = ""
WAREHOUSE = "CVA"
%}

%FUNCTION(DTW_DIRECTCALL) SndPCFile(DTW_PAD_PGM_PARMS, IN CHAR(3) WAREHOUSE, OUT CHAR(500) PCFILE) {
%EXEC {
/qsys.lib/whpgm.lib/D006C.pgm
%}
%}

%HTML(Report) {
<HTML>
<HEAD>

<TITLE>Indented Product Structure Listing (Multiple BOMs) (IndPrdStrLst)</TITLE>

<STYLE>
<!--
BODY {font-family: verdana, helvetica, arial, sans-serif; font-size:x-small} TABLE {font-family: verdana, helvetica, arial, sans-serif; font-size:x-small}
-->
</STYLE>

<script>
<!-- Begin
extArray = new Array(".txt", ".csv");
function LimitAttach(form, file) {
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1); ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) { if (extArray[i] == ext) { allowSubmit = true; break; } } if (allowSubmit) form.submit(); else alert("Please only upload files that end in types: "
+ (extArray.join(" ")) + "\nPlease select a new "
+ "file to upload and submit again.");
}
// End -->
</script>

<center>

<img align=center border=0 src="/Images/PALLHeader.jpg"><br> <H3><font color="red">Indented Product Structure Generation (Multiple BOMs)</font></H3>

<table width=50%>
<tr>
<td>Steps to follow if you want to generate indented product structures from a list of items that you can provide out to a Microsoft Excel (r) spreadsheet:<br> <hr> <br>

<li> Prepare a list of the items that you want to have the product structure in an indented bill format. Make a set of UNIQUE ITEM NUMBERS to list: no additional information is required.<br><br>

<li> Put the file anywhere in your local hard drive.<br><br>

<li> Using the BROWSE button, select the file that contains the list of items that you prepared previously.<br><br>

<li> Once you have the right file, click on the SUBMIT button to start the process.<br><br>

<b>NOTE: Specify a file that will only have the following file extensions:
<script>
document.write(extArray.join(" "));
</script>
<p>
</b>


<form method=post name=upform action="/cgi-bin/some-script.cgi"
enctype="multipart/form-data">
<input type=file name=uploadfile>
<p>
<input type=button name="Submit" value="Submit">

</form>

@SndPCFile("YES", WAREHOUSE, PCFILE)

</center>

</BODY>
</HTML>
%}

I am clicking on SUBMIT and what I am trying to do is being able to send that value out to the CLP D006C. However, I also want to figure out if this is the way to go. What I am trying to do is to upload the file with some item numbers (maybe 10-50 per instance) and once that data is up on the iSeries, I will run an RPG program that will read each item, blow the product structure of the item (bill of materials) and create the results of that explosion out to a file. The the user will be able to pull down these results into Excel.

The process I want to create must be all in a row, step by step, one after the other, immediately after the user hits the SUBMIT button:

(1) Send the file to the iSeries
(2) Call the RPG program to create the output data
(3) Create the data out to a file

Any advise is greatly appreciated.


PETER VIDAL
PALL CORPORATION
SR System Analyst | WH Application Development 10540 Ridge Rd., Suite 203, New Port Richey, FL 34654-5111
727-844-2414 | Fax: 727-815-3120 | www.pall.com

"Imagination is more important than knowledge"
Albert Einstein (1879 - 1955)
--
--------------------------------------------------------------------------------

Attention:

This communication may contain information that is confidential, privileged and/or exempt from disclosure under applicable law.
If you are not the intended recipient, please notify the sender immediately and delete the original, all attachments, and all copies of this communication.


--------------------------------------------------------------------------------
Visit our website www.vedaadvantage.com. It has a new design with improved navigation and search capabilities; and customer friendly interface with more relevant insights and solutions to help you make informed decisions.

#####################################################################################

This correspondence is for the named person's use only. It may contain confidential
or legally privileged information, or both. No confidentiality or privilege is waived
or lost by any mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You must not disclose,
copy or rely on any part of this correspondence if you are not the intended recipient.
Any views expressed in this message are those of the individual sender, except where
the sender expressly, and with authority, states them to be the views of Veda Advantage.
If you need assistance, please contact Veda Advantage on either :-
Australia 1300-921-621 or New Zealand +64 9 367 6200

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.