From: Ferran P. <fer...@re...> - 2002-08-22 17:25:40
|
Hudson Reis wrote: >Hi Ferran, > >thanks to help me! > > > >>It's easy. >> >> > >I believe so, but I don't know C.. :( > > > >>To call the routine you should terminate the parametre wirh a NULL >>(binary 0). >> >> > >Ok, I got it. > > > >>Somryhing like this should work : >> >>move spaces to parameter-wor. >> >>string address-to-verify delimited by size >> x'00' delimited by size >> into parameter-wor. >> >>call "cgi_goodemailaddress" using parameter-wor. >> >> > >What kind of variable do I need to declare?(pic a(n) or pic x(n)) >What's the size of this variable? > > The variable can be any type, I use pic x(n) but pic a(n) or pic 9(n) should work. The size is not important, the size of parameter-wor only needs to be big enought to contain all the address and the null char. If there is an empty space after this, the C routine won't use it. >How could I test the call's return from C routine on my COBOL program? How could I receive the values return from C routine on my COBOL program? > To get the return value, you should use the giving or returning clause of the call statement. call "cgi_goodemailaddress" using parameter-wor giving return-wor. I recomend that return-wor were a pic 9(6) comp, this picture is the equivalent to a C int. > > > >>Then you should coimpile the COBOL sources and link it with the C >>object. to make an executable. >> >> > >Ok, I got it. > >Thanks >Hudson > > >------------------------------------------------------- >This sf.net email is sponsored by: Dice - The leading online job board >for high-tech professionals. Search and apply for tech jobs today! >http://seeker.dice.com/seeker.epl?rel_code=31 >_______________________________________________ >Tin...@li... >https://lists.sourceforge.net/lists/listinfo/tiny-cobol-users > > -- Salutacions / Regards +---------------------------------------------------------------+ | Ferran Pegueroles Forcadell | | mailto:fer...@re... | | Tels (+34)937252106 - (+34)667658535 | | C/Unió 44 2n 2a 08201 Sabadell (BCN) | +---------------------------------------------------------------+ |