Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: To pass a structure like this: 01 LINKVARS. 03 VAR1 PIC X(02). 03 VAR2. 05 VAR3 PIC X(10). from COBOL to Java but to also send it as a Byte[] type instead of a string. Is there some way to do this? Resolution: You can't pass a record structure directly from COBOL to a Java method which is expecting a byte array, as there is no mapping for that within the Object COBOL runtime support. However, we do have a means of creating arrays using the jarray class. If you create a one dimensional byte array using the jarray class, the getData/commitData methods can then be used to copy a COBOL buffer into it. That jarray can then be passed to the
Problem: A COBOL program developed in Net Express 4.0, when run from a command line, is required to read data from a file specified on the command line. How are parameters read from the command line and redirected to an output file? Resolution: 1. To read from a file using the redirection operator "<", there is a COBOL runtime switch 'S5' that, when turned on, allows for input/output from the command line. The ACCEPT statement in the code would be: ACCEPT ... FROM CONSOLE. To turn the 'S5' COBOL switch on, either set the 'cobsw' environment variable on the command line: set cobsw= S5 or turn the S5 switch on, when running the program on the command line: Program1.exe ( S5) < data\\DataIn.dat > data\\DataOut.dat 2. The "ACCEPT ... FROM COMMAND-LINE" statement accepts arguments as strings from the command line. The following will accept '1234' as an argument and redirect the out
Problem: Net Express 4.0 How can you stop the run-time from checking if numeric data items have valid numeric data and stop the warning message "numeric field contains invalid data" Resolution: By default this checking is always ON, but you can override this by turning off the 'F run-time switch': - At the Net Express command prompt - set cobsw=-F; or - In the IDE, from the menu - 'Project' > 'Properties...'. Click on the 'Application...' in the Project Properties dialog and go to the 'Program Execution' tab. Under 'Error Handling', uncheck the checkbox for 'Validate numeric fields'. Old KB# 5370
Problem: Are there any further documentations on how to use INCLUDE or OMIT control statements in MFSORT? Resolution: Here is the description of the INCLUDE/OMIT control statements in the Net Express Help: ----------------------------------------- INCLUDE/OMIT Specifies conditions in which records will be included or omitted from the sort process. For details, see the IBM documentation to be found at Using DFSORT Program Control Statements. INCLUDE and OMIT are mutually exclusive. ----------------------------------------- You will note there is a link (http://www.microfocus.com/docs/links.asp?nx=dfs2) for details on how to use them. If you click on the link, it will take you to the documentations on DFSORT Program control statements. You will find from that site all the details about how to use INCLUDE/OMIT control statements. Old KB# 5364
Problem: In the documentation the Dialect COBOL370 and OS390 show the compiler option HOST-NUMCOMPARE To expand on the the meaning of the following associated directives... HOST-NUMCOMPARE"1" HOST-NUMCOMPARE"2" NOHOST-NUMCOMPARE HOST-NUMCOMPARE Resolution: HOST-NUMCOMPARE is actually the same as HOST-NUMCOMPARE"2"... HOST-NUMCOMPARE"1" is an earlier version and is deliberately no longer documented. It is still supported for some customers who came to rely on its semantics, however support for HOST-NUMCOMPARE(1) may be withdrawn in a future product. All new code that wants compatibility with IBM mainframe for comparisons should use HOST-NUMCOMPARE. NO HOST-NUMCOMPARE is the default setting. Old KB# 5328
Problem: What does a status 1 code returned from a WinApi call mean? Resolution: A status 1 returned from a WinApi call means "Error - invalid function". Old KB# 5390
Problem: Does Application Server support Windows Clustered environments? Resolution: Micro Focus Application Server has no direct support for Clustered Services. Applications written in COBOL however should run on a Windows Server machine that participates in a Windows Cluster. However the application will not be cluster aware. There is a API that applications can use to make themselves cluster aware:- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mscs/mscs/windows_clustering.asp?frame=true If you need to make your application cluster aware then you will need to to use these apis. Old KB# 5373
Problem: When we try to run our application on the Net Express development machine we get the following error: ASLM: Semaphore failure. ASLM: Errno 1000 Why is this? Resolution: This indicates that the Net Express runtime license cannot be found. On the development machine please ensure that your application is linked with the dynamic option and/or that PATH/COBDIR are set to point to the location of Net Express. Old KB# 5351
Problem: Release 4.0: How to use the Net Express IDE to rebuild a corrupted file index for an C-ISAM file? Resolution: Net Express IDE: Tools -> Data Tools -> Fix File Index...-> 'Filename' or 'Browse' to pick up the corrupted file -> press 'Advanced options and choose C-ISAM from the drop-down list -> press 'Fix File index' button In case of a destroyed header and it is impossible to create the structure immediatly: -> under 'Advanced options' press 'Define keys...' to set all key offsets and key lengths first. Old KB# 5369
Problem: Method to protect applications against the numerous .NET decompilers on the market? Resolution: Decompilers are not a new technology. It is perfectly possible to decompile current Win32 based applications or applications on other platforms. This is a problem for all languages. its not just an issue in the COBOL world. It is possible to decompile a COBOL program but that module would still need the COBOL runtime , File Handler , SQL , XML supporting assemblies. Even by decompiling you would still end up with very unreadable and unmaintainable code that still needs a Micro Focus runtime. In terms of security, there are a number of possible avenues to explore: http://msdn.microsoft.com/vcsharp/programming/tools/ Under "Obfuscators" there are links to a variety of products that will help secure your code. These type of products can be used to make all but the simplest Hello World type application unintelligible. If, o
Problem: The following erros may be observed when attempting to start a Fileshare Server: FS084-I Fileshare Server is starting. (Revision 9243). FS130-I Reading database reference file, please wait. FS108-I Processing the files specified in the database reference file. FS110-I D:\\ENVIRONMENTS\\V513FILESHARE\\DATA\\FILE01 - ok. FS110-I D:\\ENVIRONMENTS\\V513FILESHARE\\DATA\\FILE02 - ok. FS109-W The file D:\\ENVIRONMENTS\\V513FILESHARE\\DATA\\FILE31 does not exist FS110-I D:\\ENVIRONMENTS\\V513FILESHARE\\DATA\\FILE51 - ok. FS246-I Backing up database files to directory 'd:\\environments\\v513fileshare\\backup'. Please wait. FS250-I Deleting all unwanted log files. FS104-I The log file cannot be found, creating a new recovery log file. FS186-I The Fileshare Server is using the log file &#
Problem: Method to open a large data file with Net Express to view the contents. Resolution: Have the following section setup in the extfh.cfg file: [XFH-DEFAULT] FILEMAXSIZE=8 Where the FILEMAXSIZE parameter specifies the number of bytes used internally to store file offsets. This also affects internal locking mechanisms: programs sharing the same file all need to use the same FILEMAXSIZE settings to ensure semaphores and record locks are handled correctly, thereby avoiding potential file corruption in shared files. FILEMAXSIZE={4|8} Default: 4 4 Limits file addressibility to 32 bit values which is compatible with earlier versions of Micro Focus products. 8 Allows up to 64 bit values for file addressing on Windows NT platforms when accessing the NTFS file system, but changes the underlying record locking mechanism. Therefore, if you are sharing very large files, that is files greater than 1Gb in size, all programs
Problem: How can I send to a printer connected to a USB port using the standard ASSIGN TO clause in the SELECT statement? Resolution: The way to print via a USB-port and not to LPT1/2 etc is to use the printer_redirection run-time tuneable. The printer_redirection tuneable causes ASSIGN TO PRINTER statements to go to the print spooler rather than LPTn. Therefore, provided the printer attached to the USB has been installed properly there should be no problem printing to it. There is no way to access ports directly in our product because the operating system APIs used for file handling do not handle USB port names. To set the printer_redirection runtime tuneable you need to create a runtime configuration file and then set the run time tuneable in this file. The default filename is 'cobopt.cfg' and this is just a standard text file. However, the file can be any name of your choosing (eg; myconfig.cfg). Then, to have the runtime system access the fil
Problem: Method to pass variables between programs. Correct syntax for passing a variable back to the calling program from the EXIT PROGRAM RETURNING ... statement. Resolution: First Method - returning a value from the EXIT PROGRAM statement in the called program: Pass the value of an alphanumeric variable from the called program in the RETURNING clause of the EXIT PROGRAM statement. The variables are defined in the working-storage section of both programs. The call to the called program is call prog2 returning ws-var1. The correct syntax of the called program (prog2) would be: procedure division returning ws-var1. ... exit program returning ws-var1. Returning a variable with this method (from the EXIT PROGRAM statement) returns the 'value' of the variable. On a 32-bit machine, the length of the value is limited to 4 character
Problem: Client was getting error COBCH0250S status field is missing or illegal on every compile. This was occurring for every field specified as a FILE STATUS in their SELECT clause. The file status field had been set as follows: pic xx comp-5 Resolution: The first character of the file status field cannot be defined as a comp field. Only the 2nd character can be defined as comp. For example: 01 file-stat. 05 fs-1 pic x. 05 fs-2 pic x comp-x. This format will allow for the extended Micro Focus file status codes to be retrieved. Old KB# 5354
Problem: Found cblcore modules in many directories. Can these safely be deleted? Resolution: Cblcore is a debugging tool - it puts out a cblcore dump anytime an abend occurs. By typing in CBLCORED from a command prompt, it will put up a pop up box and you can enable or disable it. If you have already resolved the abends and do have no need to look at the dumps, you can delete them. If this is occurring on your development machine, check the animate options and uncheck core dump to stop using the function. Old KB# 5383
Problem: How to search a directory for a given file specification (e.g. *.cbl)? Resolution: The routine x"91" function 69 can be used to search a directory for a given file specification. Another way also is to call to FindFirstNext, a WinAPI function. You will find a demo for each of this routine at the Micro Focus SupportLine site (http://supportline.microfocus.com) in the "Net Express Examples & Utilities" page. The one for x"91" function 69 is called DIRLIST.ZIP while the one for FindFirstNext is called FINDFIRSTNEXT.ZIP. Old KB# 5347
Problem: Release 4.0: How to setup the File Handler configuration .cfg file a) to prevent getting this error message: 'A file which your program is accessing is too large for successful execution to continue' (extended file status code 194) and also to prevent spreading the data (file striping) under Microsoft Windows NTFS? b) to ensure that files generated and used IDXFORMAT"8" can be easily handled if they are greater than 1 or 2 or 4GB? Resolution: The .cfg file has to cover also an entry FILEMAXSIZE=8 (if not: FILEMAXSIZE=4 will be assumed by default) For additional information, under Net Express refer to: Help-> Help Topics-> Index-> FILEMAXSIZE-> FILEMAXSIZE File Handler configuration option Old KB# 5360#netexpress#RMCOBOL#COBOL#ServerExpress#AcuCobol
Problem: how to create an event handler for a control in .NET Resolution: 1) Click the form or control that you want to create an event handler for. 2) In the Properties window, click the Events button (looks like a lightning bolt). 3) In the list of available events, click the event that you want to create an event handler for. 4) In the box to the right of the event name, type the name of the handler and press ENTER. 5) Add the appropriate code to the event handler in the code behind. Old KB# 5340#netexpress#AcuCobol#COBOL#ServerExpress#RMCOBOL
Problem: CBL_SPLIT_FILENAME example in Net Express Help has been updated Open Net Express 4.0 Help Click Index tab Type CBL_SPLIT_FILENAME Click Display Scroll down to reveal "Example of the use of CBL_SPLIT_FILENAME" Click adjacent checkbox Below is a compilable version of the source shown in the Help. Resolution: copy 'CBLPROTO.cpy'. ************************************************************ * * * &n
Problem: The customer was moving both COBOL and C source programs from a Unix envirornment using OCDS to Windows XP running Net Express. Under Unix they created shared object libraries for their C programs and then they called these programs from COBOL main programs. They did not have to use a call-convention in their COBOL programs and the C entry points were found without a problem. After the customer moved the source code to Windows they decided to compile and link their C programs using Microsoft C/C 6.0 to create a single Dynamic Link Library (.DLL) containing all of the C programs. When they compiled the COBOL programs and attempted to call the C entry points within the .DLL they were getting RTS 173 "Program not Found" errors on the call. The customer did not understand the different call-conventions that can be used within a Windows program and they evidently did not know what C compiler or linker options to use in order to make the C entry
Problem: Issue with Greek Characters when ANSI characters are used (on .Net). In a .Net Winforms environment Greek characters are not displayed correctly when passed into a Winform. Resolution: This is caused by conversions taking place between OEM and ANSI character sets and UNICODE. To resolve the problem you need to perform the following code when your application starts:- call "PC_WIN_SET_CHARSET" USING BY VALUE 0 This sets up the COBOL system so that all conversions are ansi based. Old KB# 5362
Problem: MAPILogon returns 3 when used with the COBOL Multi Threaded runtime. It may work sometimes but if invokes are performed to any COM object before the MAPILogon call then you will always get a -3 returned. Resolution: You need to perform an:- invoke olesup "singleThread" so that the COBOL runtime initialized COM with CoInitializeEx(0,COINIT_APARTMENTTHREADED). If this call is not made then the runtime will initialize COM with CoInitializeEx(0,COINIT_MULTITHREADED). Microsoft's MAPI api is not compatible with COM initalized with COINIT_MULTITHREADED and has to be initialized with COINIT_APARTMENTTHREADED. Using the single threaded COBOL runtime also avoids this error. Old KB# 5343
Problem: Net Express 4.0: SWITCH-0, SWITCH-1, SWITCH-2,..,SWITCH-8 are coded in the SPECIAL-NAMES paragraph of the CONFIGURATION SECTION of a COBOL program. The program tests to see which switches are ON and behaves accordingly. The program is built as an .int or .gnt. How would you set there statuses from the Net Express command prompt, so that they are passed as parameters when the program is 'run'? Resolution: The status of the switches are set and passed to the program, at the time of program execution from the command prompt, with the following command: run ( 0 1 2) Program This sets the programmable switches SWITCH-0, SWITCH-1 and SWITCH-2 to ON and passes these settings to the program "Program", built as an .int or .gnt. Old KB# 5368
Problem: We have syncsort for windows I would like to link in there libs so when I execute a gnt with run program.gnt the sort verb in the program will use syncsort instead of mfsort. On our Microfocus unix system when we compile we use this command cob -uVP -C "nobound defaultbyte=0 CALLSORT" -N nohpchunk /prod/srclib/ProgramName.cbl -L /usr/syncsort/lib -lmfsyncsort -lsyncsort then we use COBRUN ProgramName to execute How do I do this in net express Resolution: solution: The pc is not like Unix - in this case the unix version of syncsort had been binded into the runtime The windows version does not do this in the same way - the syncsort is linked into the module doing the calling. As per syncsort docs: This is what the Syncsort documentation has on this subject. Using SyncSort from COBOL SORT and MERGE verbs When you use the S
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.