Search results

  1. G

    Question For Each {1} - Pass table name as argument

    Just use a normal assignment, as in: b:buffer-field('CustNum'):buffer-value() = "FOO". Beware: while dynamic queries are definitely a good thing, one of their drawbacks (besides explosive verbosity) is lack of compile time checking (hence, 'dynamic'). In other words, if you mistype 'CustNum' as...
  2. G

    Text to PDF converter

    This is a huge thing for us; we use GhostScript, which I don't know too much about, but it runs on our big Unix/Progress DB servers and turns PostScript into PDF. We also use a2ps to convert ASCII-type files into PostScript first, where necessary, before running it thru GS. We had a big project...
  3. G

    Question For Each {1} - Pass table name as argument

    Put that code in a .i file, say foo.i, then in some other file, say foo.p, do this: {foo.i orders} {foo.i customers} Not a great idea for the reasons mentioned, but, an order of magnitude simpler than a dynamic query, OK if you're just hacking off something in a hurry. Do it under someone...
  4. G

    Question Regarding For First

    FOR FIRST is a FOR block with the same general implications on scoping and so forth as FOR EACH. For example, it causes a new frame to be generated. Contrast this: disp "X". find first order. disp order.name. ... with this ... disp "X". for first order. disp order name. Of course these days...
  5. G

    Answered Doubt about function/procedure efficiency

    IMO, there is one solid reason to prefer external .P's (not internal procedures or functions): by using them, you are *forced* to isolate all variables and buffers. With Functions and IP's, there is nothing (compiler-wise) to stop you from doing this kind of thing: DEF VAR x AS CHAR INIT 'A'...
  6. G

    Answered Doubt about function/procedure efficiency

    IMO, there is one solid reason to prefer external .P's (not internal procedures or functions): by using them, you are *forced* to isolate all variables and buffers. With Functions and IP's, there is nothing (compiler-wise) to stop you from doing this kind of thing: DEF VAR x AS CHAR INIT 'A'...
  7. G

    capturing progress error

    I don't have a specific suggestion but IMO this is one of the weakest areas of Progress. For example, the fact that a 'RUN x.p' where x.p does not exist is handled so differently than 'RUN x.p(y)' where x.p does not expect any parameters is pretty terrible. And don't get me started about all the...
  8. G

    Passing Temp-Tables to Functions

    You could use it statically if you just define it first, eg. make the first line of your code snip above 'DEF TEMP-TABLE b FIELD x AS CHAR.' should do the trick. In either scenario, you can't 'DISPLAY b' per se because 'b' is a collection of records. You have to FIND one first.
  9. G

    Passing Temp-Tables to Functions

    Sure, here's a simple example from our code base: FUNCTION InitializeTaxFormFiles RETURNS CHAR (p_form AS CHAR, TABLE tmp_errors): You can pass handles or static tables, as in this example. One thing I don't believe you can do is return a static temp-table in the RETURNS clause. But handles...
  10. G

    Question Why Progress 4GL? Do we have a comparison study?

    IMHO, if you are comparing Progress and Oracle, you are missing the point completely. Oracle is a DB with a query language conveniently attached, whereas Progress is a (more or less) full featured language with a DB conveniently attached. Oracle without an Oracle DB is like a 747 with no wings...
  11. G

    Dynamic Temp-table

    I just tried your code and it compiled fine, I don't know what you mean by not finding the 'prac' reference. This is how you'd assign a field, this also works for me: qh:buffer-field("c-name"):buffer-value = "xxx".
  12. G

    Handle

    Use handles to create something whose details are only knowable at run-time. For example, you could create a TEMP-TABLE (sort of like a ADO RecordSet, if you are from .NET) with fields that are determined based on some input that happens at run-time. Contrast this with static TEMP-TABLEs...
  13. G

    Question File Writing - EXPORT vs PUT

    EXPORT is designed to work nicely with IMPORT, eg., 'EXPORT foo' followed by 'IMPORT foo' will work (assuming you round out a few other details). PUT could be made to be compatible with IMPORT, but it doesn't happen "automagically", it's more (say) like 'printf' in C.
  14. G

    Question widget-pools

    I think widget pools predate handles ... far as I know, they're completely opaque.
  15. G

    Question widget-pools

    I believe the answer to both is NO ... which makes it difficult to look into complicated memory problems ... if someone knows otherwise, I'd like to know about that!
  16. G

    Proxies with Common Temp-Table Definitions

    I have 2 .R's, let's call them p1.r and p2.r, that do different things, but each accepts an INPUT TEMP-TABLE that is absolutely identical (including names, types, etc.), let's call it t. If I ProxyGen these: 1) In Java, the TT is generated as a ResultSet or ProDataGraph. The fields are...
  17. G

    WSA Sessions

    Thanks for the extended reply; I don't mean to try your patience, but I am not sure that when in Session-Managed mode, "The sole purpose of the WSA is to forward the requests to a state-free AppServer" is accurate. I would say that is true of, say, the AIA, but from testing, and also based on...
  18. G

    WSA Sessions

    My apologies, I am conflating "object ID" as described in the OE manual and the generic term "session ID". I believe the WSA "object ID" performs the role of what we would call a "session ID" in web development, hence my confusing wording. Anyway, that's what I am talking about. My...
  19. G

    WSA Sessions

    These questions concern the simulated connections available in Session-Managed mode thru the Web Services Adapter (WSA), from the end-client running Java (or whatever) and submitting HTTP/XML/SOAP requests to the WSA. I can't find any documentation about this. 1. Is there any timeout (activity...
  20. G

    Arrays vs. Temp-Tables

    1) In general, expanding array extents is painful, whereas, adding another temp-table record is business as usual. This would be my #1 reason. 2) Arrays are frowned upon, and in many cases not really supported, in the SQL (IBM, MSFT, ORCL etc.) world ... so, if you want to be compatible with...
Back
Top