Prev: MS COBOL 5.0
Next: Visual Cobol
From: Jeff on 9 Jun 2005 13:10 I am writing a program and need to know the correct syntax inside Cobol for SUBSTR. Insert into catable (member, namekey, namekey6, namekey10, name) Select substr(name, 1, 2), name, 1, 6) From Member Where members not = "0000000000" Order by Members EXEC-END. Is this Correct?
From: Jeff on 9 Jun 2005 13:13 I meant END-EXEC.
From: Frederico Fonseca on 9 Jun 2005 14:30 On 9 Jun 2005 10:10:56 -0700, "Jeff" <jmoore207(a)hotmail.com> wrote: >I am writing a program and need to know the correct syntax inside Cobol >for SUBSTR. > >Insert into catable > (member, namekey, namekey6, namekey10, name) > Select substr(name, 1, 2), name, 1, 6) > From Member > Where members not = "0000000000" > Order by Members >EXEC-END. > >Is this Correct? Which COBOL vendor/version, which Pre-compiler, which OS and which Database. Syntax will vary depending on all of the above. Frederico Fonseca ema il: frederico_fonseca at syssoft-int.com
From: Jeff on 9 Jun 2005 14:46 Sorry I guess I should have included all of that, Oracle 9.1 Pro*Cobol Micro-Focus Cobol on an HP9000.
From: Frederico Fonseca on 9 Jun 2005 15:09
On 9 Jun 2005 10:10:56 -0700, "Jeff" <jmoore207(a)hotmail.com> wrote: >I am writing a program and need to know the correct syntax inside Cobol >for SUBSTR. > >Insert into catable > (member, namekey, namekey6, namekey10, name) > Select substr(name, 1, 2), name, 1, 6) > From Member > Where members not = "0000000000" > Order by Members >EXEC-END. > >Is this Correct? There is not specific way of doing it with Oracle on ESQL. so the following is correct exec sql insert into my_tbl (name) select substr(name, 1, 2) from my_other_tbl end-exec. Note that you may have an extra ")" on your previous code. Frederico Fonseca ema il: frederico_fonseca at syssoft-int.com |