Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This example illustrates how character mode screen data can be scrolled using call-by-number routine X"A7", functions 4 and 5. Resolution: INTRODUCTION ========== This example illustrates how character mode screen data can be scrolled using call-by-number routine X"A7", functions 4 and 5. It also illustrates how to use the FileType Compiler directive to create and traverse a truly temporary file (FileType"14"). Neither of these facilities are currently documented in NetExpress documentation. In addition "mode is block" is used to display a record definition that contains "filler" or "unnamed" item definitions. And the User Attribute is used to control the screen colors when the program is executed. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------
Problem: This example program demonstrates the use of Exception Handling when working within an OLE environment. Resolution: INTRODUCTION ========== This example program demonstrates the use of Exception Handling when working within an OLE environment. This program contains two entry points. The first entry point is the default Procedure Division for TestException. This is where execution begins. The second entry point is named "MyHandler" and it contains the Exception Handling code which will be called whenever an OLE Exception occurs during the processing of TestException. Two parameters are automatically passed to "MyHandler" by the OLE Exception Handler within the Net Express run-time system. The parameters are defined in the Linkage Section and they are defined as: 01 lnkExceptionObject object reference. &n
Problem: This project illustrates how to use Byte-stream File Routines to access and traverse an indexed file and summarize the records in the file by record code. Routines used: CBL_OPEN_FILE, CBL_CLOSE_FILE, CBL_READ_FILE, CBL_START_FILE Resolution: INTRODUCTION ========== This project illustrates how to use Byte-stream File Routines to access and traverse an indexed file and summarize the records in the file by record code. SOURCE FILES: ============= Program Files Description -------------------- ----------------------------------------------------------- XCreateFIDX.cbl This program creates an indexed file (FLIndex.dat/.idx) containing thirteen &n
Problem: Using display statements to track a COBOL program's activity has been pretty routine for as long as there have been programmers using the COBOL programming language. This example illustrates how you can use display statements in a COBOL DLL program. Resolution: BUILD WITH RELEASE: NetExpress 3.1 SP1, 4.0 all04n40.exe ============== Two Net Express project files, DLLDisplays.APP and DLLDisplays.OLD, are present in the project directory. The DLLDisplays.APP file is a Net Express 4.0 project file. The DLLDisplays.OLD file is a Net Express 3.1, SP1 project file. If you are working with Net Express 3.1 rename the 4.0 project file (DLLDisplays.V40) and change the file extension of the 3.1 project file from "OLD" to "APP". INTRODUCTION ========== Using display statements to track a COBOL programs activity has been pretty routine for as long as there have been programmers using the COBOL programming langu
Created On: 19 June 2006 Problem: This demo returns information about the operating system environment via the library call CBL_GET_OS_INFO. This demo also demonstrate the usage of the Library Routine Type definitions and Call Prototypes. Net Express contains two copyfiles; one contains data items used by the library routines specified as type definitions, or TYPEDEFs, while the other contains call prototypes for the library routines. These can be used in your COBOL programs to enable the Compiler to validate all calls to these routines. Resolution: INTRODUCTION Returns information about the operating system environment via the library call CBL_GET_OS_INFO. This demo also demonstrate the usage of the Library Routine Type Definitions and Call Prototypes. Net Express contains two copyfiles; one contains data items used by the library routines specified as type definitions, or TYPEDEFs, while the oth
Problem: Release 4.0: Compiling source code and receiving the error: COBCH0187S Program is nested in a program defined with the "RECURSIVE" attribute : C:\\WORK\\Cobol\\z0axd026.cob(3284,21) What does this mean? I have not used the RECURSIVE attribute. Resolution: Basically you have to recode the source: First, check the compiler directives you use to compile this program: a FLAG"COBOL370" directive was set to compile the source using a COBOL370 environment instead, and compiling was being stopped when a very last END PROGRAM statement was reached. Second, check the program structure, here found as follows: identification division. program-id. progA. identification division. program-id. progB. end program progB. identification division. program-id. progC. end program progC. end program progA. <-- COBCH0187S In an 370 environment it is not allowed to nest program sources, s. end program progA. This wil
Problem: How to delete event handler code in a COBOL win/web form. Resolution: If you accidently create an event handler and then want to delete the event handler code you have to do so in design view not in code view because some event handler code is also in the design. To delete event handler code in design view: 1) Switch to design view 2) Click on the control for which you want to delete the event handler 3) In the properties window cick on the event handler icon (looks like a lightening bolt) 4) Find the event handler that you want to delete in the list and just delete its name so that the name is blank Old KB# 3919
Problem: Release 4.0: How to implement this? Resolution: To Publish to Unix from Net Express you need to run SCP as a daemon on the Unix machine. To run SCP as a Daemon, take a look at the following: Net Express Help -> Content -> Using Net Express -> Unix Option -> Unix Option Guide -> Installing Samba and SCP -> Alternative Security Mechanism -> SCP Daemon method Old KB# 3979
Problem: How can you Delete a file in .Net using a .Net class ? Resolution: You can use the System.IO.File class to do this using code such as:- class cFile as "System.IO.File" .... invoke cFile::"Delete"("c:\\myfile.dat") Old KB# 3935
Problem: For example - I have currently Net Express 3.1 and am planning to install 4.0 on the same machine. Will I still get support for 3.1 or just 4.0? Resolution: You can install the new version of Net Express 4.0 on the same machine where you have installed the old version and they will share the same license. However, you will no longer get support for the old version after 90 days after you have upgraded your license to the new version. Please discuss this matter with your sales rep for further details and conditions! Note: Micro Focus no longer provides any fixes for old versions of Net Express regardless of whether you have maintenance contract or not. Old KB# 3941
Problem: DataGridView : How can I pick up the double-click line event in a datagridview in the .Net Framework V2? Resolution: You can detact the hit on a cell by trapping the "CellClickEvent". This event passes in an Event object that contains the "RowIndex". This can then to used to process the whole row using code such as:- set gridRow to dataGridView1::"Rows"::"Item"(e::"RowIndex") set selectedrow to class-string::"Concat"("Selected : ",gridrow::"Cells"::"Item"(0)::"Value"," - ",gridrow::"Cells"::"Item"(1)::"Value", " - ",gridrow::"Cells"::"Item"(2)::"Value") invoke cMessageB
Problem: For example - you might want to set up your own batch file to compile - and then to be able to simply click on the bat file Resolution: Have your bat file call setenv.bat located in the netexpress\\base\\bin directory Old KB# 3964
Problem: Status Key of '9d' (9/100 Invalid file operation) when closing a fileshare file Resolution: If you try to CLOSE a file that is participating in an active transaction, a 9/100 error status is returned and the file remains open. A COMMIT or ROLLBACK needs to be issued before the CLOSE can be executed. For the file to be involved in a transaction, WITH ROLLBACK has to be defined on the file. A transaction will start as soon as an update operation is executed for a file with the WITH ROLLBACK option defined on it. Old KB# 3967#ServerExpress#AcuCobol#COBOL#netexpress#RMCOBOL
Problem: Is it possible to have the Tabs on the left or right of the screen? Resolution: You can make the tabs left /right by clicking the right hand mouse button on the tab and going into properties you can select left/right. Old KB# 3946
Problem: The Micro Focus Studio 5.0 setup always comes back to the feature dialog on Windows 2000. Resolution: Make sure Windows 2000 has Service Pack 4 applied. It is a requirement to install Micro Focus Studio 5.0 on Windows 2000. Old KB# 3973
Problem: How to invoke the defualt web browser from a COBOL program Resolution: you can use ShellExecute to open a webpage EX: call "cob32api" call winapi "ShellExecuteA" using by value 0 size 4 by reference z"open" by reference
Problem: I get an RTE 114 on a GOBACK / EXIT PROGRAM / STOP RUN in EXE mode. The program runs fine in INT. Resolution: When you call a function that should have the CALL-CONVENTION for WinApi set (i.e. 66 or 74) without the CALL-CONVENTION, the stack will be corrupted. A GOBACK / EXIT PROGRAM / STOP RUN pops an invalid return address from the stack, tries to return to this address and a RTE 114 occurs. E.g. if you code call GetShortPathName instead of call WinApi GetShortPathName the stack will be corrupted after the call. This program may run for another million steps but will crash when leaving the program (compile unit), which contains the false WinApi-call. Reason: If you call a WinApi-function and do not set the call-convention, both, the calling and called programs, will remove the parameter from the stack. Old KB# 3962
Problem: CLU08ALL.EXE and ALL06N40.EXE are available at the Micro Focus SupportLine site for Net Express 4.0. Resolution: CLU08ALL.EXE is the License Protection System FixPack, and it is already part of the All WebSync WrapPack ALL06N40.EXE. It is then not necessary (and it does not hurt) to apply clu08all.exe after all06n40.exe. Old KB# 3942
Problem: mfextmap not working in an Net Express application. Resolution: The application needed to be linked with the Shared Runtime system (-f swtich to CBLLINK) and also the COBCONFIG_ environment variable needed to point to the location of the runtime tunable file with:- SET environment_mapper=TRUE Old KB# 3980
Problem: An ASP file is displayed okay from a Cobol DISPLAY statement except nothing is shown for simple ASP functions, such as current date and time. However, the same ASP file gets displayed properly by IIS server. [cobol] working-storage section. 1 OutASPForm is external-form identified by ASPFileName. 77 ASPFileName pic x(256) value "TestASP.asp". procedure division. display OutASPForm stop run. [TestASP.asp] <HTML> <HR width=80% size=4 color="green"> This is a test of ASP showing the date = <%=
Problem: Does Micro Focus support the MS SCCI standard for version control systems? Resolution: In both Net Express 4.0 and Mainframe Express 3.0 we provide support for what is called Microsoft Source Control Common Interface (MSSCCI). Old KB# 3915
Problem: Release 4.0: Zielsystem BS2000: Der Net Express Compiler akzeptiert auch syntaktisch sehr rudimentäre Programme. Wesentliche Bestandteile eines Cobol Programmes können fehlen, ohne dass ein Fehler gemeldet wird. In diesem Fall fehlte die 'DATA DIVISION'. Auf dem Zielsystem BS2000 ist jedoch eine vollständige Programmstruktur gefragt. Mit welcher Directive kann man das in NE erzwingen ? BS2000 und ANS85 helfen nicht. Resolution: Nehmen Sie bitte die folgende Direktivenzeile mit auf: $set DIALECT"BS2000" FLAG"BS2000" Während der Umwandlung des Quelltextes wird das Fehlen der 'DATA DIVISION' vom Compiler bemerkt und als Fehler dargestellt. Old KB# 3930
Problem: If you're html code contains a colon, the HTML preprocessor will treat the charaters that follow as a variable. When you go to build, you will get an error message saying operand not declared Resolution: For Example, if you are using an html tag like the following: <html xmlns="http://www.w3.org/19999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> you will get the following build errors: Operand V not declared Operand SCHEMAS-MICROSOFT-COM not declared Operand VML not declared To get around this, you would need to add code like the following to your COBOL program: ..... Working-Storage. ..... 01 temp1 pic x(2). 01 temp2 pic x(22) 01 temp3 pic x(4) ..... PROCEDURE DIVISION. ..... move ":v" to temp1. move ":schemas-microsoft-com" to temp2. move ":vml" to temp3. ..... You would then right click on your html file and select edit as text and instead o
Problem: Release 4.0: The problem is caused when a COBOL program encounters a problem and a STOP RUN is made then consequently the Java runtime is terminated. How can you prevent STOP RUN from doing this? Resolution: The use of SRV_CTL_NOSTOPRUN does prevent the JVM from terminating when using RuntimeSystem.cobcall. Old KB# 3929
Problem: If I have a .Net class and I was to pass a null reference to it from Unmanaged COBOL. How can I do it ? This is going via .Net COM Interop. Resolution: To get this worked as expected you need to pass a COM Variant object with the type set to DISP-E-PARAMNOTFOUND. This denotes to COM that it is a missing parameters and the .Net Class is given a null object. The COBOL code to do this is:- invoke oleVariant "new" returning mynull invoke mynull "getVariantAddress" returning ws-ptr set address of lnk-var to ws-ptr move DISP-E-PARAMNOTFOUND t
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.