Is there a way to create a folder in QTEMP? I have a command that when called will convert a file into CSV format (CPYTOIMPF), copy the file into a PC format with a CSV extension (CPYTOPCD), and then e-mail the file to a user (SNDDST). The command runs fine and everything works well, the only problem is that I can foresee trouble when multiple users are trying to run the command at the same time. In that case the document in the folder could be in use by two people at the same time. Is there a way to work around this? All the files can be created in QTEMP, what can be done with the document/folder?
No. There is no way to create a folder in QTEMP as QTEMP is a system library and not part of the IFS. The simple way to do this is to use the /tmp/ directory and create a sub-folder for the user name. This will separate the users, but not the jobs. If the same user were performing the same task in two sessions, you would need to concatenate the job name or number to the user name to be unique. This will also simplify cleanup, as the objects in the /tmp/ directory are usually just temporary files that can be deleted.
MORE INFORMATION ON THIS TOPIC
Ask the Experts yourself: Our experts are waiting to answer your OS/400 questions.
Ask your OS/400 questions--or help out your peers by answering them--in our live discussion forums.
Dig Deeper on Past Releases
Related Q&A from John Brandt
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.