
Nutan |
Thanks Martin,
I am not clear with the script you mentioned…
writing a new script every time is not what i am looking for as i need to automate this process.
Can I do something using CLLE or RPGLE on AS400 server. Is there any command on AS400 in CLLE through which I can create a folder in windows and cut paste the text files present in windows server to the newly created folder.
Please advise.
thanks,
Nutan.

Gilly400 |
Hi,
I suggest the following :-
Write an RPG program that creates a file with the script, based on parameters passed in to the RPG program for example :-
RPG program has parameters FromFileName, FromFolderName, ToFileName and ToFolderName. Program creates/updates a file with the following lines in it :-
MD ToFolderName
CD ToFolderName
CP /FromFolderName/FromFileName /ToFolderName/ToFileName
This should create your new folder and copy a file to it. You could replace the ‘CP’ with ‘MV’ to move your files.
Make a CL program with the same parameters, with a CALL to your RPG program to create your script file, followed by a QSH command to process your script :-
QSH CMD(’/QSYS.LIB/yourlib.LIB/yourfile.FILE/yourmember.MBR’)
Replace the yourlib, yourfile & yourmember with the library, file and member names for your script file.
Then you call your CL program with each of the 14 files that you need to process.
Hope this helps,
Regards,
Martin Gilbert.

Nutan |
Hi Martin,
Thanks for adding the Qshell concept to my knowledge repository.
while running the Qshell command through CL program, I am getting file not found error——-
/QSYS.LIB/ztstgujn1.LIB/qrpglesrc.file/ccuzr6.mbr: 001-0019 Error found searc
hing for command V001. No such path or directory.
QSH CMD(’/QSYS.LIB/ztstgujn1.LIB/qrpglesrc.FILE/ccuzr6.MBR’)
this is the path for my rpg script.
library - ztstgujn1
src PF - qrpglesrc
pgm name - ccuzr6
Am i missing on any part or doing anything wrong…Please help.
Thanks,
Nutan

Gilly400 |
Hi Nutan,
It looks like there’s an invalid command in your script member. It has found the member OK. Do you have a line with V001?
Regards,
Martin Gilbert.