progress-4gl

How to convert A0058 value to 9958 in progress 4gl [duplicate]

走远了吗. 提交于 2019-12-11 17:18:53
问题 This question already has answers here : How to convert A00073 value to 9973 in progress 4gl (5 answers) Closed 2 years ago . i have column having multiple value like A0045 ,A00065 . i want to convert it 9945, 9965. Need to remove all 0 and character value and add 99 before that value.. replace(val,"A","99") will replace only A I want to go for A-Z occurrence.. Any char should be convert .. Please help 回答1: How about newValue = "99" + LEFT-TRIM( oldValue, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0" ). This

Creating Database Table From Temp-Table (by Code)

不打扰是莪最后的温柔 提交于 2019-12-11 12:14:57
问题 I have a temp-table called tt. I want to create a database table with the same field names and types using my temp-table. I can't figure out how to do in Progress-4gl . Is this possible ? Thanks. 回答1: Short answer: yes The safest way is to do this by code is to create an incremental df and then load this. Here is a very partial start that should get you going: DEFINE TEMP-TABLE tt NO-UNDO FIELD ii AS INT FIELD cc AS CHAR INDEX ttix IS UNIQUE PRIMARY ii. DEF VAR hb AS HANDLE NO-UNDO. DEF VAR

logical XOR operator in Progress

雨燕双飞 提交于 2019-12-11 12:03:06
问题 Is there XOR operator in Progress? There is AND , OR and NOT , so, i can code " XOR " like this: (a OR b) AND NOT (a AND b) I just want to know if the operator exists (with another name). Thanks. 回答1: Unfortunately, there is no such inbuilt operator in Progress. You can implement it in the way you said. 回答2: There is no built-in XOR. But you might find this helpful: /* _md5.i RSA Data Security, Inc. MD5 Message-Digest Algorithm Progress implementation courtesy Ultramain Systems, Inc. 12/20/00

Multiple OS-COMMAND calls from procedure are conflicting

…衆ロ難τιáo~ 提交于 2019-12-11 06:23:20
问题 I have a procedure which is writing a file, emailing it using mail_files , and then an OS-DELETE statement to delete the file after it is sent. The call to the external procedure which calls mail_files or the actual OS-COMMAND itself are asynchronous. The OS is AIX 6 and the version of Progress is 102B. Here's an example below: Here is the main procedure: DEFINE STREAM outStr. OUTPUT STREAM outStr TO foo.txt. FOR EACH customer NO-LOCK: EXPORT STREAM outStr customer. END. OUTPUT STREAM outStr

How in OpenEdge ABL / Progress 4GL do I find the row id of a row that is right clicked in a broswer

会有一股神秘感。 提交于 2019-12-11 06:02:51
问题 How in OpenEdge ABL / Progress 4GL do I find the row id of a row that is right clicked in a browser. 回答1: I'm not sure if this is what you're looking for, but I hope it will be useful to someone. I wanted to respond to the mouse's Right-click in a browse. Right-clicking does not select the row you're clicking on, so I had to programatically figure out which row it was. This goes in the MOUSE-MENU-DOWN event of the browse: DEFINE VARIABLE iRowHeight AS INTEGER NO-UNDO. DEFINE VARIABLE iLastY

Fixing sql length error in progress 4gl 10.2B

心已入冬 提交于 2019-12-11 02:51:38
问题 I'm trying to use the openedge jdbc connector to pull data from an existing progress db but im running into column width issues. Here is the error that is holding me up. [DataDirect][OpenEdge JDBC Driver][OpenEdge] Column TabDisplayName in table PUB.Menu has value exceeding its max length or precision. I've looked at many posts, each offering different advice, and here's what I've given a go this far: Manually modify the SQL width via the data dictionary. I ran a quick check on PUB.Menu

How to round up in progress programming

浪子不回头ぞ 提交于 2019-12-10 22:19:49
问题 I am writing a report for an MRP program and it contains a field I calculate for the quantity to order. I need to round the number up if it is a decimal point. For example: 2.33 needs to be rounded up to 3 and so on. I have tried oder = round(order,0). but that just get me 2.00 I need that number to be rounded up to the next whole number. 回答1: function roundUp returns integer ( x as decimal ): if x = truncate( x, 0 ) then return integer( x ). else return integer( truncate( x, 0 ) + 1 ). end.

Reading XML file to Dataset in Progress-4gl

久未见 提交于 2019-12-10 19:15:22
问题 My XML File is like this <A_VERY_VERY_LONG_TITLE xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/"> <DATA_LIST> <DATA_LIST> <ELEMENT_NO1 xmlns="">ABCDEFG_1</ELEMENT_NO1> <ELEMENT_NO2 xmlns="">1234567_1</ELEMENT_NO2> <ELEMENT_NO3 xmlns=""/> </DATA_LIST> <DATA_LIST> <ELEMENT_NO1 xmlns="">ABCDEFG_2</ELEMENT_NO1> <ELEMENT_NO2 xmlns="">1234567_2</ELEMENT_NO2> <ELEMENT_NO3 xmlns="">A1B2C3D_2</ELEMENT_NO3> </DATA_LIST>

Static vs dynamic queries in OpenEdge

家住魔仙堡 提交于 2019-12-10 16:53:28
问题 Question is very common, let's see pros and cons of each in OpenEdge in terms of code readability, flexibility and performance off course. Static queries: + readability: convenient `buffer.field` notation + performance: higher (supposedly, need comments) -/+ "global scope" allows to handle all previously used buffers, but could lead to ambiguousness, so you'll have to clarify it with a table name (table.field instead of field) - flexibility: you cannot alternate predicate-expression much,

Deleting all special characters from a string in progress 4GL

笑着哭i 提交于 2019-12-10 10:33:43
问题 How can I delete all special characters from a string in Progress 4GL? 回答1: I guess this depends on your definition of special characters. You can remove ANY character with REPLACE . Simply set the to-string part of replace to blank (""). Syntax: REPLACE ( source-string , from-string , to-string ) Example: DEFINE VARIABLE cOldString AS CHARACTER NO-UNDO. DEFINE VARIABLE cNewString AS CHARACTER NO-UNDO. cOldString = "ABC123AACCC". cNewString = REPLACE(cOldString, "A", ""). DISPLAY cNewString