Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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 encoding, "UTF-8"
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!

0 votes



One answer

Permanent link

 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

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 198
× 29

Question asked: Feb 14 '24, 3:55 a.m.

Question was seen: 713 times

Last updated: Feb 14 '24, 5:38 a.m.

Confirmation Cancel Confirm