Defining COS script credentials

Primary tabs

ObjectScript, Caché

I am new to Intersystems cache COS scripts (cache is a client system). ThoughCOS scripts basically appear to be straight forward, I am having issues with the logon credentials. From what I have found in the documentation, the first 2 lines of the script contain the U/P. When running the script, the username is picked up correctly but the password is not. Granted, having U/P in a script is not ideal but will suffice as a matter of learning if I can figure out the formatting/syntax required. Any help on this would be appreciated.


Kevin McGinn


Dear Kevin,

I fail to understand your question and, seeing that it is completely unanswered for days, I suspect that others face the same problem.

First of all: "COS" is "Caché Object Script", right? Just to make sure we are on the same page here.

There is nothing inherent in ObjectScript  concerning username/password I know of. These are just scripts running on the Caché sever. So, creating the notorious HelloWorld.mac:

    write "Hello World"

it can be executed from the terminal command prompt:

mycache:USER>do ^HelloWorld
Hello World

Could you maybe provide some context and - preferably - a (sanitized) example? 



I am running this script on a Windows box. The Cos script file was written using notepad++. Because of this the file had windows line terminators.

The Fix: I updated the file replacing the Windows linefeeds with unix line feeds. The script functions perfectly now.

Thank-you for the help.