Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8554193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:49:30+00:00 2026-06-11T14:49:30+00:00

I am missing something. Please can someone tell me how this works? let rpt.chgkey

  • 0

I am missing something. Please can someone tell me how this works?

 let rpt.chgkey = null
  select cuschage.chgkey from cuschage where cuschage.cuschnum in
     (select shtwrd_no from crbookid where  
         crbookid.book_no = rpt.book_no and crbookid.line_no <= 3)

    let scratch = rpt.chgkey
    call make_charge_section(scratch) returning rpt.chgkey
 if rpt.chgkey is not null then
    print
    column 1, ESC, "(s0p12h0s3b4099T", ESC, "&a0.5R"
    print
    column 70, rpt.chgkey using "<<<<<<<<<"
end if
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:49:32+00:00Added an answer on June 11, 2026 at 2:49 pm

    Hmmm…that SELECT statement is close to pointless. You normally* execute a SELECT statement to get data into variables, but there is no INTO clause to put the returned value into.

    Given that the SELECT does nothing with rpt.chgkey, the value in scratch is NULL. The function make_charge_section is called with this value (NULL), and the result is saved in rpt.chgkey; the CALL is equivalent to:

    LET rpt.chgkey = make_charge_section(scratch)
    

    or you can do without the scratch variable and write:

    LET rpt.chgkey = make_charge_section(rpt.chgkey)
    

    (and you can do that with the CALL notation too).

    Thereafter, you display some weird control sequence to your terminal — I’m not going to try and work out which terminal or what it does; are you sure you can’t achieve the same effect with I4GL itself? And then you display the new (non-null) value of rpt.chgkey.

    So, the big unknowns here are ‘why is the SELECT statement written without an INTO clause’, and ‘what does make_charge_section() do when given a NULL value as input’?


    * The ‘abnormal’ uses of a SELECT without INTO would depend on you detecting errors in the SQL. How that happens depends on what you’ve got the WHENEVER ERROR setting set to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can someone please help me with this code, i'm missing something but can't figure
Hi can some one please tell me whether I'm missing something in the following
Can someone please tell me why the form at this location does not layout
I am missing something in my SQL query, could please someone advise how to
This is a simple one! yet, I am missing something. Please help me out.
Can someone please tell me why my build script (nant) doesn't display the unit
Can someone please explain why this Emacs regexp find_class \(\w+|([^)]+)\) \(\w+|([^)]+)\) does not match
Sorry if I'm missing something obvious here...but please take a look at this code
I know I'm missing something small.. please help! I have a repo for my
I am abviously missing something, but I keep getting this message when trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.