progress-4gl

running a loop on a comma delimited list of items progress 4GL

大憨熊 提交于 2019-12-22 06:12:49
问题 def var cList as char no-undo. assign cList = "one,two,three,four". <Loop> cList logic... </Loop> What's the best way to loop through a comma delimited list in a char variable so that in this example I would get one then two then three then four. 回答1: Lol I still remember a bit of Progress I think. DEF VAR i AS INT NO-UNDO. &SCOPED-DEFINE LIST "one,two,three,four" DO i=1 TO NUM-ENTRIES({&LIST}): MESSAGE SUBSTITUTE("LIST[&1] is &2", i, ENTRY(i, {&LIST})). END. 回答2: DEFINE VARIABLE ch-list AS

running a loop on a comma delimited list of items progress 4GL

六眼飞鱼酱① 提交于 2019-12-22 06:12:08
问题 def var cList as char no-undo. assign cList = "one,two,three,four". <Loop> cList logic... </Loop> What's the best way to loop through a comma delimited list in a char variable so that in this example I would get one then two then three then four. 回答1: Lol I still remember a bit of Progress I think. DEF VAR i AS INT NO-UNDO. &SCOPED-DEFINE LIST "one,two,three,four" DO i=1 TO NUM-ENTRIES({&LIST}): MESSAGE SUBSTITUTE("LIST[&1] is &2", i, ENTRY(i, {&LIST})). END. 回答2: DEFINE VARIABLE ch-list AS

After searching in a database how to display the result field values in an editor widget using progress 4gl

瘦欲@ 提交于 2019-12-13 06:14:49
问题 Accept a customer number and then output the details of each order and items to an editor widget. Display them in the editor widget ( editor-1 as object name). define temp-table ttcustomer field custnum like customer.cust-num field cname like customer.name field orders like order.order-num field items like item.item-num field itemname like item.item-name . find first customer WHERE customer.cust-num = input f1 NO-LOCK . create ttcustomer . assign ttcustomer.custnum = customer.cust-num

Writing Temp table value into .csv file

旧街凉风 提交于 2019-12-13 02:50:46
问题 We have created one temp-table dynamically . and we want to out put the complete table into a .csv file. how to do? DEF VAR ttH AS HANDLE NO-UNDO. ttH:CREATE-LIKE(hBuffer). ttH:Temp-table-prepare("tmytable") 回答1: Because you created your temp-table dynamically, you cannot use the EXPORT statement (at least to my knowledge). What you can do though is dynamically output first the fieldnames and then the field values of your table. Like so: DEFINE VARIABLE hQuery AS HANDLE NO-UNDO. DEFINE

Progress display long field (frame/form)

风格不统一 提交于 2019-12-12 19:15:39
问题 How can i display a long field on screen. For each cust : Display remarks. End. The remarks field has 300characters to display. The display statement gives an error that the field is too long to display. I already tried form and frame definitions. With the width-option this doesn't work. Now i tried with size 300 by 2 but then it show me 80 chars and scroll bars to see the rest. How can i display the field completely on the screen without scrolling etc? Tkx 回答1: I'm assuming that a "remarks"

How to Copy MEMPTR to/from a LONGCHAR variable with out getting error or NULL value?

最后都变了- 提交于 2019-12-12 19:04:23
问题 while copying the value of a MEMPTR to a LONGCHAR variable using GET-STRING, i got an error 9324 . Is there any solution ? I've tried this: function x returns longchar(): DEF VAR i_xml_string AS LONGCHAR NO-UNDO. DEF VAR i_mem AS MEMPTR NO-UNDO. p_doc:SAVE("memptr":U, i_mem). COPY-LOB FROM i_mem TO i_xml_string. return i_xml_string. end. But got the following errors: [16/03/17@10:20:58.984-0700] P-009824 T-000001 3 4GL 4GLTRACE Return from ConvertXmlDocToLongString "" [yeai/ye508mu.p] [16/03

Progress 4GL web service procedure

≯℡__Kan透↙ 提交于 2019-12-12 02:37:40
问题 I'm trying to update our stocks thought the Magento API using Progress 4GL (OpenEdge 10.2B) So far so good, ie: I can update the stock if the SKU is a match. But if it isn't, it doesn't return an error. So I looked into how ABL manages SAOP fault errors, and found some examples which I tried to implement. But to no avail. My new code is as follows: DEFINE VARIABLE hWebService AS HANDLE NO-UNDO. DEFINE VARIABLE hMage_Api_Model_Server_V2_HandlerPortType AS HANDLE NO-UNDO. DEFINE VARIABLE

How to identify the lock acquired by another user on a record in progress openedge

只谈情不闲聊 提交于 2019-12-12 01:51:46
问题 User A has read first record from a customer table. User B wishes to know the lock which is held by A on the record. How will B identify the lock held by User A programmatically. 回答1: You can use LOCKED function: Returns a TRUE value if a record is not available to a prior FIND . . . NO-WAIT statement because another user has locked a record. Example of the documentation: REPEAT: PROMPT-FOR customer.cust-num. FIND customer USING customer.cust-num NO-ERROR NO-WAIT. IF NOT AVAILABLE customer

Opening a STREAM in a Persistent Procedure Function

≡放荡痞女 提交于 2019-12-12 01:16:32
问题 I have a persistent procedure, in which I am trying to open, write and close a stream. I have in the main area of the procedure DEFINE STREAM sOutFile. OPEN STREAM sOutFile TO VALUE( outFileName ). MESSAGE SEEK( sOutFile ). and subsequently a function within the persistent procedure FUNCTION example RETURN LOGICAL: MESSAGE SEEK( sOutFile ). PUT STREAM sOutFile UNFORMATTED someData. END. When the persistent procedure is instantiated, the message displays "0" so the stream has been opened.

Implementing WS-Security in Progress ABL

偶尔善良 提交于 2019-12-11 23:13:55
问题 I'm struggling with implementing WS-Security in Progress ABL. It seems possible, this knowledgebase: http://knowledgebase.progress.com/articles/Article/P88147 states: For outgoing WS-Security, create SOAP Headers containing the WS-Security content manually using the OpenEdge Web Service client. First of all I'm struggling with the creation of a base64 encoded and SHA1 digested password hash. Password digest according to the WS-Security specification. Source. Password_Digest = Base64 ( SHA-1 (