Constant variable in SQL cursor

5 pts.
Tags:
AS/400
SQL Cursors
select  gthamcode as hamcode, gtnumber as item, 'G' from testlib/gtinl01 where (gtnumber between 08000000000000 and 08999999999999) union all select modkey as hamcode, modndcnum as item, 'M' from testlib/hammodel where (modndcnum between 08000000000 and 08999999999)   This works with interactive SQL but I need to use this in an COBOL embbeded SQL cursor. The 'M' and  'G' are constants not on the files, they show me which file the record came from.

Software/Hardware used:
AS400 Embedded SQL COBOL
ASKED: February 28, 2013  7:23 PM
UPDATED: February 28, 2013  7:34 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    So what is the problem? It should work fine. What does your cursor declaration look like? Is there an error code? Does it retrieve wrong rows? -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following