if you have a transfer created to upload or download this can be modified to go run the transfer or change the transfer name in the &strcmd on the fly and do multiple transfers. We use something similar to this with menu options to allow user to download and view/modify in Excel and/or Word and then upload modified data back to 400. I use a version to upload 7 text files and then run a program against them to create a file that gets updated only if the text files have a new creation date.
Remember , this will need be modified to your current needs.
<pre>
PGM
/* clle must be run on PC where everything is located. */
/* create directory called download on PC or specify your directory of choice. We use DOWNLOAD as a defaule so we will always know where to look for transfer STUFF */
/* create transfer to download EXCEL file to directory on PC */
DCL VAR(&STRCMD) TYPE(*CHAR) LEN(55) +
VALUE(‘C:\DOWNLOAD\EXCELFROM.DTF’)
/* or *.tto */
DCL VAR(&PCCMD) TYPE(*CHAR) LEN(55)
/* run the transfer */
STRPCO PCTA(*NO)
MONMSG MSGID(IWS4010)
STRPCCMD PCCMD(&STRCMD) PAUSE(*NO)
/*the transfer is done at this point – now */
/* if necessary change the transfer name and repeat the code.
/* open the EXCEL file on the PC. if needed */
STRPCO PCTA(*NO)
MONMSG MSGID(IWS4010)
STRPCCMD PCCMD(‘START C:\DOWNLOAD\EXCElTEST.xls’) +
PAUSE(*NO)
ENDPGM
</pre>
Hope this helps
BigMac
Discuss This Question: 6  Replies