Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable passing to the Shell function.

Status
Not open for further replies.

Lysen

Programmer
Apr 9, 2002
87
NL
Hi group,

I have this script which generates PDF files based upon lots of prompts. It stores these in a directory from where I read them in the script again to send them off via email.

I have a table which contains the email address and which PDF to send to a particular person.

The script runs fine when someone gets just about 4 files. it goes wrong when they get more...

I fill up the variable blat which I pass to the shell function; x=Shell(blat,7)

so my question is: is there a limit of characters to pass to the shell function? or should I define the var blat differently?

Thanks in advance...

 
Lysen,
I think we'll need a little more info to help you with this. If you can post a larger sample (or all) of your code, we might be able to help you figure out what's going wrong. Also, what email program are you using?

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
Hi DoubleD,

I don't think posting the code will help, i'm just curious if the 'commandline' shell can execute is bound to a limit or something...

Code:
x= shell("c:\blat\blat.exe " & variable,7)

And why does the writing a string to a file enclose it with quotes?? I don't want the quotes! but cognosscript does it anyway... :(
 
Lysen,

I've found that the macro editor doesn't like strings longer than 256 characters, either explicit or implicit. If your shell command, with variables, exceeds this that might be the cause of your problem.

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
Want good answers? Read FAQ401-2487 first!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top