Passing parameters

nicolas

Member
Hello

The basic question is:


How to pass parameters concatenated into a string using theseparator "^" one file to another


I have a file that receives 2 parameters recibir.p. Get a file nameand a string concatinate, concatenated values ​​are separated by the character "^"
My second file gets the string in the format parameters val1 ^ val2 ^ val3 ^....^ valN
The work context is as follows: from php file is called recibir.ry thiscalls the second file, but the separation character is omitted, ie itdoes not reach the second.

in brief

recibir.r("val1 ^ val2 ^ val3 ^....^ valn") -> segundoarchiv.r()

segundoarchiv.r() recibe val1val2val3....valn



Tengo un archivo recibir.p que recibe 2 parametros. Recibe un nombre de archivo y una cadena contatenada, los valores concatenado se separan por el caracter "^"
​Mi segundo archivo recibe la cadena de parametros en el formato val1^val2^val3^....^valn
El contexto de trabajo es como sigue: desde php se llama al archivo recibir.r y este llama al segundo archivo, pero el caracter de separacion se omite, es decir, no llega bien al segundo archivo.
 

rzr

Member
If I understand you correctly ->
1. program recibir.r recieves an input parameter with value "val1 ^ val2 ^ val3 ^....^ valn"
2. You want to send this value as input to another program segundoarchiv.r in the form "val1val2val3....valn"

Is this correct?

You could do this: segundoarchiv.r(REPLACE(("val1 ^ val2 ^ val3 ^....^ valn"),"^"."" ). But then how will you differentiate what the value separator is in second program?

Or are you saying that the input value received in recibir ("val1 ^ val2 ^ val3 ^....^ valn") - when sent as input to segundoarchiv ; somehow end up showing as "val1val2val3....valn"

não entendi sua pergunta !
 

rick.souza

New Member
Sometimes it´s difficult to help our friends with a small fragment of code like yours. Try to attach the file.

In my analisys, you could try the "NO CONVERT" option to the end of the INPUT FROM statement (on the second program). Maybe it works.

Take a look at: INPUT FROM statement Help to get more information. Here is a fragment of the help: NO-CONVERTSpecifies that no character conversions occur between the external file and memory. By
default, the INPUT FROM statement converts characters from the -cpstream code page to
the -cpinternal code page.
 
Top