Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
I have to rebuild COBOL embedded programs from ORACLE sql to MS SQL-server SQL. 1) For ORACLE we had a translation for the codes : * ORACLE sqlcodes. 01 C01-SQL. 03 OK VALUE ZERO PIC S9(04) BINARY. 03 NOT-FOUND VALUE 1403 PIC S9(04) BINARY. 03 ALREADY-EXIST VALUE -0001 PIC S9(04) BINARY. &nb
Hello, I am trying to open an excel document and then count the total number of Rows and Columns. But somethings i am doing wrong and i get meaningless or same numbers (depents on putting USAGE COMP-3 or not at the end of W-BX-CELL-DATA variable) 77 excel-app handle of application. 77 excel-workbook handle of workbook. 77 excel-sheets handle of sheets. 77 excel-worksheet handle of worksheet. 01 TARGET. 05 CELL-LETTER1 PIC X VALUE IS " ". 05 CELL-LETTER2 PIC X. 05 CELL-NUMBER PIC 9(6). 01 W-BX-CELL-DATA PIC X(100) VALUE SPACES. ******************************now the routine*********************** INQUIRE excel-worksheet @Range(TARGET)::End(xlDown)::Row IN W-BX-CELL-DATA. MOVE SPACES TO W-BX-CELL-DATA INQUIRE excel-worksheet @Range(TARGET)::End(xlToRight)::Column IN W-BX-CELL-DATA.#excelcolumnsrows
Hello, I have a variable X(256) and i am trying to fill the status-bar title but it displays only 128 characters. Why? How can i add more?
Hello, I have the following java code : Connection connection = null;try { /* DB2 */ Class.forName("com.ibm.db2.jcc.DB2Driver"); connection = DriverManager.getConnection ("jdbc:db2://db2server:50000/mycooldb2 }catch (ClassNotFoundException e) { e.printStackTrace();}catch (SQLException e) { e.printStackTrace();} RunUnit runUnit = new RunUnit();XVsd138l vsd138L = (XVsd138l) runUnit.GetInstance(XVsd138l.class); vsd138l.XVsd138l(sl_ext_uebergabe, sextuebergabe, sl_uebergabevsdl18l, suebergabevsdl18l); XVsd138L is a Cobol Program as Bytecode with ILSMARTLINKAGE. It does some SELECTS from "mycooldb2" and returns the values. I would like to use the database connection that has been established with java. The Documentation speaks about using "DB2 BIND CONNECTION" inside COBOL. But I have no clue what to do in java in order to get this working. Some Code examples would be great Kind regards Michael#SQL#JVMCOBOL
I am trying to open a socket, make the connection with user and password and then moving to the appropriate directory of the remote-server and execute an ls (LIST) command. Where i can store the result of the ls command? is there any way to store the filenames and directories? Giorgos#socket
I am getting a "COBES0100 : Incorrect SQL statement syntax near: RESULT" when I try building my project. RESULT is a column name in one of my tables. This code is coming over from Acucobol, where It compiles and runs with no problem. According to the documentation the COBES0100 error may come if the SQL directive BEHAVIOR is set to MAINFRAME, but I have it set to ANSI. I am getting it as well for column name DATASET and APPLICATION. Am I doing something wrong or will I have to change the Column name in the SQL Server database?
Can someone explain to me what the difference between these 2 bits of code are? I thought they would essentially do the same thing... I don't understand why when I call some dll's either works fine. And other dll's only work using the M$ALLOC method. There must be something different about these that I don't understand OR maybe I'm completely off my rocker here and have no idea whatsoever :-) Assume you have some dll with the function "SetData" CALL "M$ALLOC" USING 20, PTR.CALL "M$PUT" USING PTR, "Hello World". IF IS-REMOTE CALL "@[DISPLAY]:SetData" USING 20, BY VALUE PTR.ELSE CALL "SetData" USING 20, BY VALUE PTREND-IF.CALL "M$FREE" USING PTR. IF IS-REMOTE CALL "@[DISPLAY]:SetData" USING 20, BY REFERENCE "Hello World".ELSE CALL "SetData" USING 20, BY REFEREN
here is the c# Code: List<string> options = new List<string>() ((CollectionViewSource)this.FindResource("cvsOptions")).Source = options List<WPFGridZeilen> GridList = new List<WPFGridZeilen>() What is it in Cobol ? #OnemoreCWPFtoCobol
Hi ;)It's possible to use Linq connection with Visual Cobol ? Like this: http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx http://codesamplez.com/database/linq-to-sql-c-sharp-tutorial http://weblogs.asp.net/scottgu/archive/2007/07/11/linq-to-sql-part-4-updating-our-database.aspx http://www.macoratti.net/10/05/c_ulinq.htm http://www.wikihow.com/Use-LINQ-to-SQL-in-C-Sharp http://www.codeproject.com/Articles/46422/A-LINQ-Tutorial-Adding-Updating-Deleting-Data#Linq#VisualCOBOL
I was looking at the examples in "PC_PRINTER_SET_DEFAULT". Example #2 uses the routine to brows for a printer. It then uses the routine to set the printer as the default. It then uses "PC_PRINT_FILE" to print a file to the printer. This is just what I need. The problem is that the example and the routine definition do not explain where the "Printer Browser Handle" comes from. The example uses a linkage section variable. Could you let me know where this handle comes from and how to use it? What I want to do is to let the user select a printer and then print two files to this printer. Concatenating the two files before printing is NOT an option.
Hi I have a method that scans a directory and copies each file found to a sub-directory ("backup"). The problem is that the directory scan routine ("CBL_DIR_SCAN_READ") does not return with a file name. I get all of the time stamp info for a valid file, but no name. Could you tell me what I am doing wrong. Here is my method: Working-Storage Section. 01 ScanHandle Pointer. 01 ScanPattern. 05 Patternlength Pic XX comp-5 Value 3. 05 PatternText Pic XXX Value "*.*". 01 ScanA
Hi :)I'm codding some test here, and, I see it's possible to use linq functions with VCobol, but, I don't know how to use that. http://i.imgur.com/4v79axn.png how I can use the select linq function, or, how I can make lambda expressions with Visual Cobol ?#VisualCOBOL
Hi I Need a public Method like this in C#: public class WPFGridZeilen { public string GrSp01 { get; set; } public string GrSp02 { get; set; } } It's a public Class in a C# EXE File And with this i can get/set Data in a WPF DataGrid... #PublicClassforaWPFDataGrid
Im reading an indexed file with visual cobol and displaying its data in a multiline textbox. The problem is that every field has a different size (not in the pic definition, but the "letters size"), and that completly disrupts the text formatting. See image below: What's the best solution for this problem?
Dear friends, I wonder if I can hide a tab control page in NetExpress Sincerely Rogerio Barbosa
Hi :) I have a code when I use the IS keyword, in C#, and I would be convert that code to Visual Cobol, how I can make this ? see the code: private static System.Boolean IsNumeric(System.Object Expression) { if (Expression == null || Expression is DateTime) return false; if (Expression is Int16 || Expression is Int32 || Expression is Int64 || Expression is Decimal || Expression is Single || Expression is Double || Expression is Boolean) return true; try { if (Expression is string) Double.Parse(Expression as string); else Double.Parse(Expression.ToString()); return true; } catch { } return false; } Thanks Alexandre Bencz
I am working with a dll where all the strings used in the funtion calls are defined as null terminated unicode strings. I have never had to work with unicode before. Unicode seems to define each character as 2 bytes and my calls to the functions using standard PIC X fields don't seem to function properly. Any ideas on how I can make my PIC X fields unicode so that my function calls work properly?
Problem A VISION indexed file can no longer be updated due to error 98,01.READ statements on the file are still possible but WRITE or REWRITE operations cannot be executed. Resolution File status code 98 means:Indexed file corrupt. An internal error has been detected in the indexed file. The secondary error code 01 means:The file size listed in the file's header does not match the actual file size. The first thing to do to solve the problem is to rebuild the indexed file using the Vision File Utility (vutil on Linux/Unix platforms, vutil32.exe on Windows). To avoid this error returning in the future, caution should be taken in the way the COBOL source code accesses these files.For instance, it has been noted that a repeated occurrence of OPEN/CLOSE loops may cause the index file to become corrupt, mainly when other programs try to READ/WRITE the same file at the same time.In critical programs, a solution may be found in executing a single OPEN I-O at the start of the program a
Hi!I have a problem that seemingly occurs when calling Cobol from Java.Note that we still use Net Express 3.1 and the mfcobol.jar that comes with it.We have a Java application that acts as a server and calls procedural cobol to do the business logic.With every call to cobol, the memory usage of the process gets bigger and bigger.I checked the java heapdumps, but i couldn't find anything suspicious there.The called program is packaged in a dll and loaded with runtime.cobload().The dll is linked with options shared,dynamic and multi-threaded.All calls are done with runtime.cobcall_int(...) and the parameter types are always the same (an object array of one string and 2 StringBuffers).The Cobol program itself uses a thread-local-storage and calls several procedural sub-programs, all of which use working-storage sections.Does anyone have a clue of what is happening here or what i am missing?Do i have to use runtime.cobfinalize() on objects that i passed as parameters for the call?The stran
We have a screen that needs to be scrolled down/up to see the entire screen. Is there any way that a image of the entire window can be taken? W$BITMAP works for what is on the screen but not the entire window contents. Any help or ideas would be appreciated.
I create an excel file with many workbooks (worksheets) inside but after 281th workbook i create the program returns me an error. The line i am facing the error is the following: CREATE Application OF Excel HANDLE IN olExcel MODIFY olExcel @SheetsInNewWorkbook= W-B9-SHEETS-COUNTERS MODIFY olExcel Workbooks::Add() GIVING olWrkBk variables: 77 olExcel HANDLE OF APPLICATION. 77 olWrkBk HANDLE OF WORKBOOK. 77 olWrkSh HANDLE OF WORKSHEET.77 OLRANGE HANDLE OF RANGE. 01 W-B9-SHEETS-COUNTERS PIC 9(9). Does anyone know why is that? Giorgos#Excel
Hi! As there is more and more different screen resolutions out there, we are experiencing that grid size is getting an increasing problem. Maybe we have a wrong, or slightly wrong, approach to calculating the size of the grid. We use today textsize-data from the font used (very often default font), but in same resolutions this is not correct. I would be very grateful if anyone could give some information on how they calculate the size of the grid, and maybe a short code sample. Regards Dagl
The following program doesn't seem to do anything. It compiles and runs, and in the debugger the IF conditions indicating an error are never TRUE. It just runs to completion, displays blanks, and writes no file. What am I missing? (ACUCOBOL version is 32-bit ACU 9.2.1 for Windows.) IDENTIFICATION DIVISION. PROGRAM-ID. IOTEST. DATA DIVISION. WORKING-STORAGE SECTION. 01 FILE-STATUS-GROUP. 03 FILE-STATUS PIC XX COMP-X. 03 REDEFINES FILE-STATUS. 05 FS-BYTE-1 PIC X. 05 FS-BYTE-2 PIC X COMP-X. 01 FILENAME PIC X(32) VALUE "test.txt". 01 ACCESS-MODE PIC X COMP-X VALUE 3. 01 DENY-MODE PIC X COMP-X VALUE 0. 01 FILE-HANDLE PIC X(4) COMP-X VALUE 0. 01 OFFSET PIC X(8) COMP-X VALUE 0. 01 WRITE-COUNT PIC X(4) COMP-X VALUE 32. 01 READ-COUNT PIC X(4) COMP-X VALUE 32. 01 GREETING PIC X(32)
At workspace level there is an option "Enable indexer" When this option is on. When you add many programs to a Cobol (local or remote) project, the indexation starts in background. You can't compile a program during the indexation. The indexation may take hours (depending number of programs and number of copys used), so before to compile you have time to drink a pint of single malt ! What is the real usage of the index ? What is the impact if the indexer is off : When I compile a single program is a local project ? When I compile a single program in a remote project ? When I start a project build ? What is the impact if the indexer is off For the local debug ? For the remote debug ? TIA#indexer
Im trying to convert a textbox information to decimal like the following: 01 FIELD PIC 9(10) ... SET FIELD TO TYPE System.Convert::ToDecimal(self::textbox1::Text) The problem is that the textbox contains a mask, and the function tries to convert "(XX)XXXX-XXXX" to numeric, and fails. Is there a way to make the textbox recieve only the typed information?
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.