× 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.




I have a program with an sql select I check sqlcod within that fetch I
may run an SQL Delete
The issue is that this delete sets my sqlcod to 100 sometimes causing
the program end the because subsequent fetches wont run due to
SQLCOD<>'00000'
0223.00 C CheckLines BEGSR
0224.00 C DOU SQLCOD<>0
0225.00 C/Exec SQL
0226.00 C+ Fetch Next
0227.00 C+ From Canceled
0228.00 C+ Into :Parent,
0229.00 C+ :Shipto,
0230.00 C+ :Company,
0231.00 C+ :Order#,
0232.00 C+ :OrderType,
0233.00 C+ :DeliverOn,
0234.00 C+ :ShipDate,
0235.00 C+ :OrderDate,
0236.00 C+ :CancelDate,
0237.00 C+ :BusinessUnit
0238.00 C/End-Exec
0239.00 C IF SQLCOD = 0
0240.00 C*-----------------------------------------------



Can I move the Value of SQLCOD to another variable so my code would read


0223.00 C CheckLines BEGSR
0224.00 C DOU FetchCode <> 0
0225.00 C/Exec SQL
0226.00 C+ Fetch Next
0227.00 C+ From Canceled
0228.00 C+ Into :Parent,
0229.00 C+ :Shipto,
0230.00 C+ :Company,
0231.00 C+ :Order#,
0232.00 C+ :OrderType,
0233.00 C+ :DeliverOn,
0234.00 C+ :ShipDate,
0235.00 C+ :OrderDate,
0236.00 C+ :CancelDate,
0237.00 C+ :BusinessUnit
0238.00 C/End-Exec
Inserteted Line EVAL FetchCode = SQLCOD

0239.00 C IF FetchCode = 0
0240.00 C*-----------------------------------------------

Next Question:
Is it okay to delete records from a LF that is just an alternate key of
the Original Physical file
In general I try to perform Updates directly on the Physical file and
Use LF for Input only
Not sure why just something that I was told to do many years ago and
continue to try to do today
Is there a real reason or am I just making my life more difficult.

Thanks

Mike

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.