To Create File on Desktop using Doors DXL OSLC service.
Hello everyone,
I am facing an issue while trying to create a .txt file on the desktop using Doors DXL OSLC services called through a Python API. Below is the DXL code I am using:
pragma runLim, 0 // No limit
noError
string getPath = (getenv("USERPROFILE"))"\\Desktop\\Export.txt"
Stream outputfile = write(getPath, CP_UTF8);
void getHelloString(string inputText)
{
outputfile << inputText
close(outputfile)
setDxlServiceResult "Done"
}
The API output returns
<doors:result rdf:parseType="Literal">Done</doors:result>
, indicating that the API is running successfully. However, the .txt file is not being created on the desktop.
Is there any way to create a .txt file on the desktop using OSLC services in Doors DXL?
I appreciate any insights or suggestions on how to resolve this issue.
Thank you!
One answer
I don't have the slightest idea of how DXL works and what is syntax is. However, I think, if you set the service result to done without checking if your DXL operation actually worked, you should not expect anything other than what you see.
I found this about error handling in file operations in DXL: https://www.ibm.com/docs/en/cobol-zos/6.4?topic=errors-handling-in-input-output-operations