× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Are you beginning the statement in Area A? It must be contained within Area B, from col 12 on. If the n is in column 24, then counting backwards, it looks like you started the EXEC in Area A.

Robert Munday wrote:
I want to put SQL Set Option options in an SQL COBOL program I am updating. My code is:

0103.00 ** Set SQL Options SQL Exec SQL Set Option SQL Commit = *None, SQL DecmPt = *Period, SQL Naming = *Sys, SQL DatFmt = *ISO, SQL TimFmt = *ISO, SQL UsrPrf = *Owner, SQL DynUsrPrf = *Owner
SQL End-Exec.
I put it at the beginning of the procedure division. This isn't going to work well as there are other SQL statements in the data division. The Set SQL Option is supposed to be the first executed but I don't know if putting that code ahead of the other SQL statements in the data division is the proper way to go. I tried it and got the following compile messages:
MSGID: LNC2913 SEVERITY: 30 SEQNBR: 010400 Message . . . . : Syntax error detected at 'EXEC'. MSGID: LNC0018 SEVERITY: 0 SEQNBR: 010400 Message . . . . : Input ignored starting with 'EXEC'. MSGID: LNC0001 SEVERITY: 10 SEQNBR: 010500 Message . . . . : Blank assumed before character 'N' in column 24.
MSGID: LNC0519 SEVERITY: 0 SEQNBR: 010500 Message . . . . : CODASYL COBOL reserved word 'NONE' has been accepted as a non-reserved word. MSGID: LNC0001 SEVERITY: 10 SEQNBR: 010600 Message . . . . : Blank assumed before character 'P' in column 24.
MSGID: LNC0001 SEVERITY: 10 SEQNBR: 010700 Message . . . . : Blank assumed before character 'S' in column 24.
MSGID: LNC0001 SEVERITY: 10 SEQNBR: 010800 Message . . . . : Blank assumed before character 'I' in column 24.
MSGID: LNC0001 SEVERITY: 10 SEQNBR: 010900 Message . . . . : Blank assumed before character 'I' in column 24.
MSGID: LNC0001 SEVERITY: 10 SEQNBR: 011000 Message . . . . : Blank assumed before character 'O' in column 24.

You can see the pattern here. I have no examples from which to work and the code I am using is from an SQLRPGLE program. SQL should work the same way in both places unless my punctuation for COBOL is wrong. How to proceed?

Thanks,



Robert Munday
Munday Software Consultants
Montgomery, AL
on assignment in Columbia, SC




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.