Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: 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: 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: 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: 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
Problem: How can I create a Net Express command prompt? Resolution: Unfortunately there is no automatic way to install/setup the Net Express command prompt. You will need to create a shortcut yourself with the following properties: Title : Net Express Command Prompt Target : C:\\Windows\\System32\\cmd.exe /K createnv.bat Start In : "c:\\Program Files\\Micro Focus\\Net Express\\Base\\BIN" You many need to amend the above to match your own installation details i.e. your Windows installation folder may not be called "Windows" and you may not have installed Net Express in the default location. The quotes on Start In are required due to the long and spacey filenames used. Old KB# 5349
Problem: * Copyright (C) 1984-2002 Micro Focus International Ltd. URN AXCGG/AA0/00000 72-' <INPUT TYPE="Submit" NAME="Logon" value="Chang C:\\MF\\Net Express31\\Base\\WORKAREA\\TESTHTML.CBL(72,51): * 3-S Illegal format : Literal 73-'e Password" onClick="return NumericCheck(USERID)"></td></tr></TA C:\\MF\\Net Express31\\Base\\WORKAREA\\TESTHTML.CBL(73,9): *1003-E First character of a continued literal not a quote. Quote assumed. * Total Messages: 2 * Unrecoverable : 0 Severe : 1 * Errors : 1  
Problem: Method to determine if an object-reference is set to an object Resolution: The only way to do this is to initialise to null. When it is non-null it is set to something else. Old KB# 5298
Problem: Working storage not being initialised between CALLs in a CICS environment. Resolution: The directives required to achieve this functionality are: CALL-RECOVERY DATA-CONTEXT Old KB# 5266
Problem: How to pass a linker option like /DELAYLOAD through CBLLINK? Resolution: Unfortunately, CBLLINK cannot pass options to Microsoft's LINK.EXE. The alternative is to specify options for the Microsoft linker LINK.EXE as an environment variable, e.g. set LINK=/DELAYLOAD:MyDLL.dll Microsoft's Linker options can be found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_linker_reference.asp and how to set those options here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_set_linker_options.asp Old KB# 5270
Problem: When using the the cobol command line to compile programs within a batch file (for example: cobol sourcename,,nul,,directives;) - the user will observe that when a copyfile for this source does not exist, the compiler requests: FILE BELOW NOT FOUND - Stop/Retry/Continue/Alter-path and starts waiting for keyboard response, the entire build batch stops because of this and operator intervention is necessary. Resolution: To change the behaviour of the cobol command line so it only reports the missing copyfile, and continues without intervention all that is required is to add the directive NOQUERY to the command line, thusly: cobol sourcename,,nul,,NOQUERY directives; Old KB# 5290
Problem: Method to suppress the DOS window showing on an x"91" function 35 Resolution: Unfortunately there is no method to suppress the command window being displayed when executing an x"91" function 35. An alternative solution is to use: 1) Using the CBL_EXEC_RUN_UNIT API instead. 2) Calling the operating system CreateProcess API. Old KB# 5317
Problem: How to use a self declared type within the File Section? FD EIN. 01 EIN-SATZ. 05 Testdate PblType-Dat. 05 filler pic x. working-storage section. 01 PblType-Dat is typedef pic 9(08). Resolution: Use a prototype for your program: program-id. tst is PROTOTYPE. working-storage section. 01 PblType-Dat is typedef pic 9(08). end program tst. program-id.tst. ... FS EIN. 01 EIN-SATZ. &
Problem: Should a Net Express 3.1 module be able to call a Net Express 4.0 module? Resolution: Net Express does not support calls involving programs compiled under different versions. When upgrading all programs should be recompiled. Old KB# 5264
Problem: Method to shut down fileshare via a command file (without GUI interface) Resolution: Some new commands line commands have been added for FSVIEW with Net Express 4.0. If a password file has not been created or no password has been added for FSVIEW that needs to be done as FSVIEW is the admin user for Fileshare. FS /pf password.dat /u FSVIEW /pw FSVIEW Fileshare must be using the password file FS /s FSTEST /pf password.dat First test that this will works on a test machine. FSVIEW Server set the_server_name Admin password the_admin_password Server shutdown Exit If this works, take the commands after FSVIEW and place them in a control file (any name is fine; e.g., "your_control_file") Retest by entering the following: FSVIEW @your_control_file Old KB# 5311
Problem: The "Click here to install Net Express with .NET" link from the main install page does not bring up the next page. It seems as it was unable to load IWIZ01.HTM from the CD-ROM's \\autorun\\html folder. Resolution: 1. Open Windows Explorer 2. Open \\AUTORUN\\HTML from CD-ROM drive 3. Double-click on IWIZ01.HTM The above steps would allow to resume with the rest of the steps to install Net Express with .NET. The problem seems to have occurred only with a web browser (e.g. Mozilla Firefox) that was not Internet Explorer. Old KB# 5269
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.