progress-4gl

How to catch OS-COMMAND results in Progress-4GL?

时光怂恿深爱的人放手 提交于 2021-02-11 16:51:38
问题 I'm using the logging facilities, as described in this other post: OUTPUT TO VALUE("C:\Temp_Folder\logfile.txt"). ... PUT UNFORMATTED "Start : Check-zones" SKIP. ... OUTPUT CLOSE. This is working fine. Now I would like to add the results of an OS-COMMAND in the output file. I've already tried the following: (putting the results in a newly to be created file) OS-COMMAND NO-WAIT VALUE("WMIC printer get name, deviceID >> C:\Temp_Folder\Printers.txt"). This is working fine. So, I know the command

How to catch OS-COMMAND results in Progress-4GL?

此生再无相见时 提交于 2021-02-11 16:50:30
问题 I'm using the logging facilities, as described in this other post: OUTPUT TO VALUE("C:\Temp_Folder\logfile.txt"). ... PUT UNFORMATTED "Start : Check-zones" SKIP. ... OUTPUT CLOSE. This is working fine. Now I would like to add the results of an OS-COMMAND in the output file. I've already tried the following: (putting the results in a newly to be created file) OS-COMMAND NO-WAIT VALUE("WMIC printer get name, deviceID >> C:\Temp_Folder\Printers.txt"). This is working fine. So, I know the command

How to change date format based on variable initial value?

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-29 17:20:27
问题 I use below program to change the date format based on the value setup in variable(cDataFormat). But the concern is this can be changed by the user and the program should act accordingly DEFINE VARIABLE cDate AS DATE NO-UNDO. DEFINE VARIABLE clogindate AS CHARACTER NO-UNDO. DEFINE VARIABLE cDateformat AS CHARACTER NO-UNDO INIT "YYYY/MM/DD". /*this can be changed by user*/ cDate = DATE(11/27/2020). IF cDateformat = "YYYY/MM/DD" THEN clogindate = string(year(cDate),"9999") + string(month(cDate)

How to avoid AppBuilder removing pieces of code

核能气质少年 提交于 2021-01-29 11:11:09
问题 I'm working on a Progress-4GL programming environment, based on AppBuilder release 11.6. Until now I've been changing already existing *.w and *.p files, but now I wanted to created my *.w file from scratch. I've created a window and I've put a browse, a fill-in field and a button. Now I would like to add an event to that button. In order to do that, I add following lines to the *.w file: ON CHOOSE OF btn-Start_Query IN FRAME DEFAULT-FRAME DO: MESSAGE "button is pushed" VIEW-AS ALERT-BOX. END

How to do logging in OpenEdge Progress?

浪尽此生 提交于 2021-01-28 09:09:53
问题 I've found different ways to log something in Progress 4GL but none are satisfying: The simple MESSAGE statement has the drawback that it handles frames very badly: ON CHOOSE OF btn-Q4 DO: MESSAGE "Line 1". MESSAGE "Line 2". MESSAGE "Line 3". PROMPT-FOR ... WITH FRAME ... ... MESSAGE "Alert message" VIEW-AS ALERT-BOX. PROMPT-FOR ... WITH FRAME ... /* (another frame) */ ... MESSAGE "Another alert message" VIEW-AS ALERT-BOX. ... MESSAGE "Normal message". END. This starts by showing lines 1 and

Adding a tabpage control to a Progress-4GL Windows application yields a license problem while working with ActiveX

冷暖自知 提交于 2021-01-07 01:59:26
问题 I'm creating an OpenEdge Progress-4GL application, based on a window, where I like to add a tabpage. In order to do this (as there is no tab page control in the palette), I've tried to add the OCX (ActiveX) control "Microsoft TabStrip Control, version 5.0 (SP2)". However, when I try this I get the following error message: Messagebox title: AB Messagebox content: CtrlFrame Unable to create control. Het licentie bestand voor genoemde ActiveX control is niet gevonden. The last sentence is in

Progress 4GL Display Buffer Lock Type

风流意气都作罢 提交于 2020-01-16 01:14:12
问题 I would like to ask if there is a way to display the current lock type of my buffer in a message box. Is there a way to do this? I just want to check what type of lock there is on my buffer on run time. For example: MESSAGE STRING(myBuffer:LOCK-TYPE). Output: NO-LOCK/SHARE-LOCK/EXCLUSIVE-LOCK 回答1: Not directly. You can use the LOCKED( bufferName ) function (or the related attribute of a buffer handle object) to see if it is locked or not but you cannot distinguish between SHARE and EXCLUSIVE

what is the efficiency of an assign statement in progress-4gl

自闭症网瘾萝莉.ら 提交于 2020-01-15 11:53:31
问题 why is an assign statement more efficient than not using assign? co-workers say that: assign a=3 v=7 w=8. is more efficient than: a=3. v=7. w=8. why? 回答1: You could always test it yourself and see... but, yes, it is slightly more efficient. Or it was the last time I tested it. The reason is that the compiler combines the statements and the resulting r-code is a bit smaller. But efficiency is almost always a poor reason to do it. Saving a micro-second here and there pales next to avoiding disk

Create COM-Object from own C# Dll in Progress 4GL

落爺英雄遲暮 提交于 2020-01-13 19:53:28
问题 I'm wondering how I can create a Com-Object from my own C# DLL. I made the following Class in C#: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace ProgressNet { [Guid("a9b1e34d-3ea3-4e91-a77a-5bcb25875485")] [ClassInterface(ClassInterfaceType.AutoDual)] [ComVisible(true)] [ProgId("ProgressNet.Server")] public class NetServer { public NetServer() {} [DispId(1)] public string GetString() { return "Some String";