Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
How can i detect within a cobol program on a Windows PC if there is running a 32bit outlook/excel/word or a 64bit version is running? If it is possible a solution in cobol. Thanks in advance.#extend
Environment: Windows 10, VS15, VC2.3, MySQL5.7 Hi all, After a bit of experimenting there seems to be a 128 byte limit on the sql code for each item 'selected' - is that right? Can it be increased? e.g. this simple example works and returns SQLCODE zero. 01 my-host-field pic x(500). Procedure division.exec sql select blah1, concat('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'), blah3 into :blah1, :my-host-field, :blah3 from my-table limit 1end-exec. HOWEVER if I add one more 'x' or indeed if I use any select column code > 128 characters e.g. a long case statement, sub-query etc, it still works but I get SQLCODE=1, "[MySQL][ODBC 5.3(w) Driver][mysqld-5.7.12-log]Stri
How would you write the student.Add(new Student() {....} in .net cobol. My attempt is invoke student::Add(new Student() (new Student::ID This is as far as I got before syntax errors. SqlDataReader dr; try { conn.Open(); dr = cmd.ExecuteReader(); while (dr.Read()) { student.Add(new Student() { ID = dr.GetInt32(dr.GetOrdinal("ID")), Name = dr.GetString(dr.GetOrdinal("Name")), DateOfBirth = dr.GetDateTime(dr.GetOrdinal("DateOfBirth")) }); } dr.Close(); }
Hi there, Is there an MF dialog GUI method to refresh an object only i.e. not set focus on it? For example to enable an object i just do this. Is there a refresh equivalent method? CALL 'GUI-enable' using my-dialog-object-handle. GUI.cbl --------------------------------------------------------------------------------- $set mfoo class-control. AbstractWindow is class "awindow". working-storage section. 01 obj object reference value null. linkage section. 01 hand pic x(4) comp-5. procedure division. entry 'GUI-enable' using hand. *> enable object from handle... invoke abstractWindow "fromHandle" using hand returning obj. invoke obj "enable". invoke obj "destroyproxy" returning obj. goback. Many thanks, Linden
Is it possible for the scroll bar in a list-box to make it wider to make it visible on a tablet / phone?
How would one convert this linq/lambda expression to .net cobol return Enumerable.Range(0, reader.FieldCount) .ToDictionary( i => reader.GetName(i), i => reader.GetValue(i));What I have so far is invoke type Enumerable::Range(0, reader::FieldCount)::ToDictionary(I do not know how to covert the lambda expressions to .net cobol or is it possible?.
Is there a way to produce COBOL program statistics report. Similar to the method Mainframe express used to do it. I need the lines of code for the programs. We are starting a process of source cleanup, removing dead statements and unused data. Need to be able to show a before and after report.
I'm using Visual COBOL in Visual Studio 2015 and I'm having trouble doing a simple CALL statement. In NetExpress the called program .CBL had to be in the same directory and it always worked. Not sure where to put the called .CBL program in Visual COBOL. This is a very simple program to show students how to retrieve the date in various formats using a CALL statement instead of hard coding the code. I've tried to place it in various different folders but get the following error: 173 Called program file not found in drive/directory [DATE-TIME] I've even created a folder called [DATE-TIME] and placed the code inside of this folder but I get the same result. Here is the code IDENTIFICATION DIVISION. PROGRAM-ID. DATE-TIME-EXAMPLE. * ****************************************************************** * * This is an example of a program that "calls" another program * (in this case the DATE-TIME program). * ******
Has anyone tried running Visual Cobol in Visual Studio 2017 yet?I know VS 2107 isn't officially out yet, but it sounds like it will be released soon.#VisualStudio
One of our customers is having an issue where they are getting a 98,38 error on a specific record. We run Recover1 on the file, and Recover1 says it fixes the file, but then when I bring that customer back up in our software, I am still getting the 98,38 error. Is there anything else I can do to fix this error?
Here is my select statement for a file used as printer handling SELECT PRINT-FILE ASSIGN TO PRINTER "prt109" FILE STATUS IS ERR-STATUS. FD PRINT-FILE RECORD CONTAINS 132 CHARACTERS LABEL RECORDS ARE OMITTED. 01 PRT-BUFFER. 10 PL PIC X(132). I have an environment statement of dd_prt109=>lp -dprt109 -s -oraw Writing out records to this file and then doing a close works just perfectly, however I need to add in contents from an existing file which happens to contain some binary data and is much larger than my print file definition. As such I cannot just read one line at at time from the binary file and inset to the print file. Any suggestions?
Hi all, I'm gone to migrate Solaris 10 update 11/6 for SPARC to other SERVER sparc, it's mandatory to add some kernel patches to support new HW. I know this version is also certified for general Solaris 10, but I haven't found anything about compatibilty ACUCOBOL-GT 7.1.2 and Solaris 10 update xxx.
Property type FlatStyle for Button control in winform application is set to type "standard". This behaves well in the development environment but it behaves as if property type was set to "Flat" when winform executed from windows 2012 server. I have enabled EnableVisualStyles and i did hard code flat style property as well in code behind program but with no use.
How would one do this in Cobol .Net? My main concern is the IsValidData function. How would I write that in .net cobol using invoke. I tried invoke type Validator::IsPresent(txtCode) and invoke type Validator::IsDecimal(txtPrice) returning validData but there is a syntax error with the 'and'. If isValidData() then *Do somthing end if Public Function IsValidData() as Boolean Return Validator.IsPresent(txtCode) andalso Validator.IsDecimal(txtPrice) end function Class - Validator Public Shared Function IsPresent(textbox as Textbox) as Boolean if textbox.text = " " then Messagebox.Show("Error") return false else
In looking at the evaluate statement for the button click event, why does the evaluate txtEmailAddress::text::IsValidEmail() produce an error selection object does not match selection subject. I put the set and evaluate validEmail in to show that it works. I was trying to combine statements like you can do in C#. method-id btnSubmit_Click final private (sender as object e as type System.EventArgs). local-storage section. 01 validEmail type System.Boolean. * set validEmail = txtEmailAddress::Text::IsValidEmail()* evaluate validEmail evaluate txtEmailAddress::Text::IsValidEmail() when true &
How would one rewrite the Enum.GetNames(typeof(MyEnumType)) syntax to .net cobol. I am trying to populate my combobox with an enum and I cannot figure out the syntax for the GetNames(). public enum MyEnumType { Sunday=0, Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6, } // In the form Load event, bind the combobox to the data source. private void Form1_Load(object sender, EventArgs e) { comboBox2.DataSource = Enum.GetValues(typeof(MyEnumType)); comboBox2.SelectedItem = MyEnumType.Friday;
Hello: Has anyone successfully passed data values (besides the server ip & port#) via the "RMCobol WoW Extensions" file RPCPLUS.INI ? The RPCPLUS.INI file is installed on the PC and must include the Unix server ip & port# to run the object on the unix server. I'm trying to pass the windows user name (or just a name) to the unix server so I can identify the thin client user on the unix server. Thanks!!#MicrofocusCOBOLToVisualCOBOLconversion#COBOL
Problem: I have an existing application that uses Indexed Sequential files - IDXFORMAT(3), and they are approaching their size limit. I need to continue to add additional records to the file. Resolution: Use REBUILD to convert to IDXFORMAT(8) By default Visual COBOL V2.3 creates indexed sequential files as IDXFORMAT(8) (large format), in addition FILEMAXSIZE(8) is also set by default. In order to convert existing files to other formats, use the Rebuild utility. Rebuild is a file management utility invoked from the command prompt which enables you to: Reorganize an indexed file Rebuild a corrupt indexed file Convert files from one organization to another Validate an indexed file In the example below Rebuild is used to display information about the file MUSTOCK.DAT using the /n parameter : Note: the file format is IDX-3 - IDXFORMAT(3). In order to convert this file to IDXFORMAT(8) (large format
This is just sample code, but I wanted to know what would be the equivalent .net cobol to the while(dr.read) and populate to a list. public class Student { public int ID { get; set; } public string Name { get; set; } public DateTime DateOfBirth { get; set; } } after that List<Student> student = new List<Student>(); SqlConnection conn = new SqlConnection(@"Data Source=.\\SQLEXPRESS;AttachDbFilename=D:\\Prac\\TestAssembly\\ForumsProjectCSharp\\App_Data\\Studetnt.mdf;Integrated Security=True;User Instance=True"); SqlCommand cmd = new SqlCommand("select * from Student", conn); SqlDataReader dr; try { conn.Open(); dr = cmd.ExecuteReader(); while (dr.Read()) { student.Add(new Student() { ID = dr.GetInt32(
Our examples will focus on a single control. We’ll show you how to manipulate the properties of that control programmatically. We may have to include one additional control but the focus on each project will be on a single control with a supporting role for the additional control. This article is about the TextBox control. Textboxes can save a COBOL developer a significant amount of coding time. Most COBOL developers are used to reading some data from a screen, processing the data and when an error is found in a field the screen is sent back to the user with some annotation to correct the field in error. This process may occur numerous times until all the data on the screen has been checked for formatting and accepted. With textboxes and masked textboxes the developer is able to define input length, formats and type so that a user would have a very hard time entering in a piece of data that was unacceptable to the underlying application. The TextBox example will show several different
Problem: I want to use the Micro Focus Data Tools from within the Visual Studio IDE. How do I do this? Resolution: Add the MF Data Tools to the Tools menu within the IDE. From within the Visual Studio IDE menu select Tools > External Tools In the External Tools dialog box, select Add. Enter a name for the menu option in the Title box - MF Data Tools In the Command box, enter the path to MFDATATOOLS.EXE, or select Browse to navigate to C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\bin\\mfdatatools.exe (installation folder for Visual COBOL). Select OK. A command for the tool, using the text you entered as the Title, now appears on the Tools menu. You can start the tool by choosing the new menu command. The Micro Focus Data File Tools appear:
Problem: I am responsible for installing or upgrading Server Express or Server for COBOL on Linux or UNIX. Where can I find general instructions and considerations for this? Solution: Here are general instructions and considerations for installing or upgrading Server Express or Server for COBOL on Linux/UNIX. The product named "Server Express" is the main product. It includes both the compiler and the runtime system. The product named "Server for COBOL" does not include the compiler; it includes only the runtime system. Think of "Server for COBOL" as being a sub-set of "Server Express". In early versions, the product Server for COBOL was named differently; it was named "Application Server for Server Express", or "Micro Focus Server". Server for COBOL is meant to be installed on production machines where COBOL will run, but where COBOL should not be compiled. Administrators may want to prevent people from compiling COBOL code on productio
What is the difference is using data type condition-value vs type System.Boolean. For example: method-id btnSubmit_Click final private (sender as object e as type System.EventArgs). local-storage section. 01 passwordStrength type Boolean. invoke txtPassword::Text::IsStrongPassword returning passwordStrength. evaluate passwordStrength When false invoke type MessageBox::Show("Please Enter A Stronger Password", "Password Error", type MessageBoxButtons::OK) invoke txtPassword::Focus() invoke txtPassword::Select(0, txtPassword::Text::Length) when true invoke LogUserInfo() end-evaluate end method. The above gives me an error 'selection object does not match selection subject' in the evaluate statement. But yet, when I change the local variable to condition-value instead of System.Boolean there is no error. This is the called method and method-id IsStrongPassword(s as string) returning strongpassword as type Boolean extension. local-storage section. Ev
Hello, please help. I have 2 applications - managed and native - and need to use WM_COPYDATA message to pass (in this case just one string) data from managed to the native one. The most important is to fill the structure COPYDATASTRUCT correctly but until this moment I haven't been successful. The window procedure of the window in the native code receives the message WM_COPYDATA, the address of the COPYDATASTRUCT structure is also ok and cbData and dwData members too. The only thing I don't know is how to pass the string. There're many examples on the internet in C or C# but those didn't help me. The sending managed code is following: method-id OnRibbonItemClick (ln-item-name as string) public.01 COPYDATASTRUCT is typedef. 03 dwdata ULONG. 03 cbdata ULONG. 03 lpdata pointer. 78 WM-COPYDATA &n
Hi, please I have troubles with debugging. I have this situation: compiled .GNT and .IDY file (can't use .INT, because program is called from Infor SunSystems and there must be GNT) I have checked "compile for debugging" and "enable multiprocess debugging" then I start my app (Infor SunSystems) and connect to it from Visual Studio via Debug -> Attach to process, here I choose Micro Focus: Native Debugger Code then when my program run, it will stop on first line, but when I hit F11 key, it runs thru to the end BUT, and this is interesting, when this program called another program, which is still compiled in Net Express 5.1 debugging is working, F11 key move line by line in code in Visual Studio! please, there must by some solution, how to debug correctly, mostly if programs compiled in Net Express, can be debugged in Visual Studio :-) Thanks for any help#debugging#VisualStudio
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.