Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Is it possible to change the SORT/MERGE operation to a 3rd party? Resolution: The compiler directive CALLSORT defines the program to be called to handle all SORT/MERGE operations. The syntax is as follows: CALLSORT "sort-name" "sort-name" is the root-name of a program to be called to process sorts and merges. The default is - CALLSORT"EXTSM" Old KB# 2000#ServerExpress#RMCOBOL#COBOL#netexpress#AcuCobol
Problem: Compiling a COBOL program that is running on IBM COBOL MVS and the reserved words are not being treated as reserved words by the checker. Resolution: When compiling your COBOL program use the directive "MVS". This will turn-on the IBM COBOL for MVS reserve word list. The syntax: >>-.---.-.----.--MVS------------------->< -/- -NO- Parameters: None Properties: Default: NOMVS(Dialect ) Phase: Syntax check $SET: Initial Dependencies: The MVS directive sets DBSPACE and DBCS"3" immediately. Old KB# 2074
Problem: How to convert a given UTC time into a local time using Net Express functions ? Resolution: This intrinsic function CURRENT-DATE delivers the difference back inbetween GMT (Greenwich Mean Time => UTC => Universal Time, coordinated) and the time running onto a local machine. For example: 01 myDateTime pic x(21). . move function CURRENT-DATE to myDateTime . Positions 17 up to 21 from myDateTime having included a content of: 0100 onto a local machine running under Central European Time (CET), means UTC 1 hour. Net Express documentation files: All details can be found here: Help -> Index -> CURRENT-DATE function -> COBOL Language Old KB# 1588
Problem: When programs were moved from one machine to another, programs that had been producing standard record sequential files now created files with a hex(0A) at the end of each record, that is, line sequential files were produced by default. The version of Server Express was different, but this did not seem relevant. Resolution: The compiler directive SEQUENTIAL determines the default type of sequential file produced. The default is RECORD (SEQUENTIAL"RECORD"), the four values possible are ADVANCING - RECORD SEQUENTIAL with LINE ADVANCING. ANSI - ANSI-conforming RECORD SEQUENTIAL. LINE - LINE SEQUENTIAL. RECORD - RECORD SEQUENTIAL (a standard SEQUENTIAL file). On the new machine, a cobol.dir line contained the phrase SEQUENTIAL"LINE" (though no one admitted to having entered that text). N.B. This directive can be set "invisibly" because of another directive being used: NORM or RM"ANSI" will set this to SEQUENTIAL"RECORD" RM will
Problem: Compiler error on a variable INTERFACE-ID defined in wokring storage. This has happened after a compiler upgrade to the latest version of the compiler. Resolution: INTERFACE-ID was added as a reserved word when support for the ISO2002 standard was introduced. You can use the REMOVE directive in order to let your program compile or run. For example :- $SET REMOVE"INTERFACE-ID" working-storage section. 01 INTERFACE-ID PIC X(50). procedure division. start-section. move "hello" to INTERFACE-ID. stop run. Old KB# 2070
Problem: Whenever an event is triggered on an ASP.NET Web page, the run-time system will automatically invoke the associated COBOL event handler method while also passing the required event handling parameters within the call. Resolution: The actual parameters that will be passed depend on the type of the event but in most cases the event handling method will be generated as follows: method-id. "Page_Load" is private. local-storage section. linkage section. 01 param-sender class-sysobject. 01 param-e class-eventargs. procedure division using by value param-sender param-e. There are two parameters that are passed to the Page_Load event. The first one is "param-sender" which will contain the object that fired the event. This could reference a Button control on the current page. The second parameter is "param-e" which will contain an instance of the "System.EventArg&quo
Problem: When calling a dynamically loadable shared object (.so or .sl for HP/UX) you receive this error. Resolution: You have attempted to load a shared object with a name that has not been defined. When you create a dynamically shared object using Micro Focus "cob" (cob -zv pgm-name.cbl myC.c), any references in the COBOL or C function must be resolved at link time. COBOL pgm-name.cbl Procedure Division. Call "another-cobol-pgm". The COBOL program "another-cobol-pgm" must be resolved. That is, the linker must be able to resolve the symbol. If not, the shared object will be created, but you will not be able to load it. Hence the 9/118 error. To get around this you can specify the -U cob flag when creating the shared object: cob -zvU pgm-name.cbl myC.c The -U flag causes any unresolved reference to be treated as a COBOL program to be
Problem: When compiling a program using IDXFORMAT"8" in the cobol.dir file, can this program still access existing files with a different IDXFORMAT type? Resolution: Yes, the file handler knows the format of existing files when it opens them and reads the header information so it is possible to create new files as IDXFORMAT"8" while still being able to open existing IDXFORMAT"3" files. for example. Old KB# 1592#COBOL#ServerExpress#AcuCobol#netexpress#RMCOBOL
Problem: We have a product developed in C that uses the MicroFocus file handler (extfh). The product works on a variety of Unix platforms, but we are having problems porting the product to RedHat Linux. When we attempt to open the file, a 9/142 error occurs. Resolution: This is a problem with byte-ordering. Using the CTF utility with the following options: mftrace.level=info mftrace.comp.mf.mffh.xfh#base=true produced a trace which showed the Opcode being passed to the File Handler Open was 01FA, instead of FA01: 15:04:55.295 MF.MFFH.XFH 65536 1 "M" 01FA Old KB# 2012#netexpress#AcuCobol#ServerExpress#COBOL#RMCOBOL
Problem: If Net Express 4.0 and Net Express 5.0 are installed on the same computer is there the capability of using either 4.0 or 5.0 of Net Express. The customer develops and distributes runtime executables, that need to run with Application Server 4.0 but would also like to use 5.0 for the clients that have upgraded to 5.0 Will the executable developed with 5.0 work with Application Server 4.0? When Net Express is opened for a compile, Net Express 5.0 comes up. Resolution: It is possible to have both Net Express 4.0 and Net Express 5.0 installed on the same computer without a problem as long as the PATH, COBDIR etc., environment variables are set so that the desired compiler folder will appear first within the environment variables folder list. If a shortcut is created on the desktop which will point to either the BIN folder of Net Express 4.0 or 5.0 as desired then it should start the correct version. These are all comp
Problem: Net Express IDE -> Animate -> Start Animating... Der Animator versucht ein Programm zu laden, auch wenn es bereits aus dem Projekt entfernt wurde. Wie kann erreicht werden, dass das korrekte Programm animiert wird? Resolution: Der gewuenschte Startort zum Animieren wird in der Net Express IDE permanent hier bestimmt: Animate -> Settings -> General -> Start Animating at: Das bedeutet, dass nach dem Entfernen von ProgrammA aus dem linken Projektfenster der Eintrag ProgrammA zum Starten des Animators zunaechst bestehen bleibt, weil dieser vorher der festgelegte Ort des Startens des Animators war. Die unter Animate -> Start Animating... gemachten aenderungen sind temporaer und eine Warnung weist darauf hin, dass aenderungen an dieser Stelle nicht ins Projektfile einfliessen. Old KB# 1601
Problem: Sort causes a runtime system failure, error message is rts 173 load error on file EXTSM The failure occurs when SORT is the first file io operation attempted in the application. Resolution: The error ocurrs because the run time system dynamic loader can not find the Net Express sort module (EXTSM) EXTSM is linked with a part of the Micro Focus filehandler (MFFH.DLL) - The EXTSM module will be loaded along with MFFH.DLL if any other file io operation is executed prior to the SORT statement To Resolve: Create EXTSM.DLL file and place in the Net Express runtime directory Use the following command to create a Extsm.dll. cbllink -d -RS -k -v extsm.obj>cbllink.txt<Enter> or Place the extsm.dll in the folder where the application is executing. This will make the sort available to all .EXE and .DLL programs. Cbllink.txt will capture all the details published by the "verbose" switch (-v) and the "keep" switch (-k) will retain the modul
Problem: Defining a field with S9(31) COMP-3 returns the message : * 213-S***************************** ** ** Item is longer than USAGE allows or contains too many numeric positions Resolution: According to the ANSI standard, numbers are limited to 18 significant decimal digits. All significant digits must be within 18 digits of the decimal point. Old KB# 2061
Problem: You can use code such as :- MOVE '"' & ProgramID & z'ToolbarDestroyed"' TO MessageName INVOKE EntryCallBack "new" USING MessageName RETURNING aCallback MOVE P2Ce-Destroyed TO i INVOKE aWindow "SetEvent" USING i aCallback INVOKE aCallback "finalize" RETURNING aCallback to detact when a window is destroyed in the class library. What event can you use to determinate is
Problem: ======== FOR INDexed files, You can get the number of records using the FCD-RELATIVE-KEY of the structure File Control Description (FCD). You can have the FCD on-line in your prog: or assigning the FCD in your program using the FCDREG compiler directive or using the EXTFH function x"0006" == File Information ======== For Line Sequential files, you can use the UNIX command wc-l , using a PIPE to retrieve the output of this command ======== Resolution: The content of the File Control Description (FCD) is documented in Micro Focus products ......................... The program RCCOUNT.cbl uses the FCDREG compiler directive and assigns the FCD for a file . ......................... The program EXTFHINFO uses -- the EXTFH function FileInformation function x"0006" to retrieve various informations for a specific file ( INDexed and SEQUENTIAL Variable Length )... --the UNIX command wc -l to retrieve the number of records of a Line Sequential fi
Problem: Using the standard no CD install procedure for Server Express (i.e. cat v5000cob.trz | gzip -d - | tar xf - ) gives an invalid blocksize error. Resolution: This is probably due to the .trz file being corrupted. To verify this use the gzip command seperately from the tar command thus: ./gzip -d v5000cob.trz -S .trz If everything is okay with the .trz file it will have been replaced by an uncompressed file called v5000cob. The Server Express install files can be extracted from v5000cob using: tar xf v5000cob and the install can then proceed using the newly extracted install script. If v5000cob.trz has been corrupted by the copy process then an error message will be displayed when attempting the gzip command. On the HP PA-RISC system where this procedure was tested the error message was "Format Violated". Old KB# 2051
Problem: After performing a REWRITE in a COBOL program, a grep of the file written to may show the record twice. This does not happen with Object COBOL Developer Suite. Resolution: The Server Express file handler attempts to write new data to a file as quickly and as securely as possible. It achieves this by writing a new copy of the record in a different place on the file and marking the 'old' record for deletion. Thus even if there is a crash before the index is updated, reading the file will give the correct information. Records marked for deletion will show up in a 'rebuild -f' as Type 2 records. A proper rebuild will remove them. The only downside to this way of working is that a grep of the file while Type 2 records still exist on there will show them as apparently present. This is potentially confusing, but the advantages of working in this way outweigh the disadvantages (old records can after all never be accessed). Old KB# 2052
Problem: Is there an easy way of telling whether we have Application Server, Enterprise Server or the Development System set up in the environment? Resolution: You can recognize the product from the second character of the PRN. This is the number we use to identify the product versions for each platform. You can see the PRN by typing cob -V. The possible values for the second character are : X for Server Express, 1 for Application Server B for Enterprise Server So, the PRN will look similar to these examples: PRN=RXCTH/AAM:9i.T4.40.01 - development product PRN=R1CTH/AAD:9i.T4.40.01 - application server PRN=RBCTH/AAC:9i.T4.40.01 - enterprise server You can also cat the $COBDIR/etc/cobver file for this information. Old KB# 2032
Problem: Changing the date format stored in COBOL register from MMDDYY to DDMMYY. Resolution: The compiler directive CURRENT-DATE specifies the format stored in the CURRENT-DATE special register. The syntax is CURRENT-DATE "date-format" "date-format" is either DDMMYY or MMDDYY Setting CURRENT-DATE to DDMMYY causes CURRENT-DATE to be stored in European format. The parameter can be specified in either upper case or lower case. Old KB# 2003
Problem: Background information: Indexed files in Micro Focus COBOL can have different formats or organizations. An indexed file's format is decided at the time the file is created, under the control of the IDXFORMAT compiler directive. The default IDXFORMAT value is "1", meaning "C-ISAM", whereas the value "4" means, "an optimized form of Micro Focus indexed file format". Here is a table summarizing common formats: 1 C-ISAM format. 3 Micro Focus indexed file format. 4 An optimized form of Micro Focus indexed file format, for fast duplicate key handling. 8 Large indexed. Once a file is created with a certain format, it retains that format for life (unless it is converted using the "rebuild" command). For more information, look in the main index of the Server Express documentation, under the keyword "IDXFORMAT", and check each of the references there. In this
Problem: Program a calls program b with 4 linkage parameters. Progam b is only using 3 parameters. Can this be flagged as an error at compile time? Resolution: To make this work code a prototype copybook. A sample of how to do this is attached. To get the compiler to complain about incorrect parameters in a CALL statement, the compiler must first know what a correct CALL looks like. Supplying a CALL prototype does this. CALL prototypes are supplied in a special format (usually implemented in a COPY file for the sake of reuse) I have attached a demo to this note, the demo shows how to define CALL prototypes for user written programs. When you define a prototype you must define everything about it. The data types being passed, the way the item is passed, even the size and usage clause needs to be defined in the prototype. Once the prototype definitions are in the
Problem: Animating programs located in one folder location off the \\DEBUG folder (i.e., "FOLDER1\\DEBUG") which call .gnt's from a different folder off the \\DEBUG folder (i.e., "FOLDER2\\DEBUG") generates an "ERROR 173: Called program not found in drive/directory"). Resolution: Within the NetExpress IDE, do the following: 1.) Open a NEW project 2.) Pull down the "Project" menu and select "Properties". The "Properties Window" will appear. 3.) Click on the "IDE" button located in the "Environment" section of the window. 4.) A window will pop up with the title "Configure IDE environment". Change or set environment variables for the environment within that window. For example, to change the environment variable COBDIR: enter COBDIR as the "Variable" name. &nbs
Problem: Documented as follows: The configuration parameter MOUSE-ENABLE adds mouse support. Clicking the left mouse button anywhere within the current input field causes the cursor to relocate to that position. You do not need to add new dialog code: the behavior is instantly available on existing screensets when this parameter is set. Syntax: [NO]MOUSE-ENABLE Properties: Default: No mouse support. Resolution: Enable Mouse Support has no effect on UNIX but will work on the DSCHAR port to Net Express. This can be seen by viewing the Dialog runtime config file $COBDIR/dialog/dsdef.cfg * [NO]GOF-TO-OUTFIELD [No] Allow cursor to GOF into output field * IGNORE-NUMERIC-SETCUR Ignore SETCUR value on entry to numeric fields * MOUSE-ENABLE &nb
Problem: Is there a log file created when installing Net Express 5.0 or 5.1 and Server 5.0 and 5.1? Resolution: The log file is created in %TEMP%, e.g. C:\\Documents and Settings\\UserID\\Local Settings\\Temp or C:\\Users\\UserID\\AppData\\Local\\Temp The log file for Net Express is called NXP32MSILOG.TXT while the one for Micro Focus Server is SRP32MISLOG.TXT. Old KB# 1615
Problem: We are moving a host application to Net Express from our mainframe. We want to use Line Sequential files without changing our code. How can this be done? Resolution: The SEQUENTIAL directive can be used for this. Specify the directive as: SEQUENTIAL(LINE) If you are only using DISPLAY output and want that output to be Line Sequential, then use OUTDD. Specify this directive as: OUTDD(XYZ.TXT 121 L) Old KB# 1597#netexpress#AcuCobol#ServerExpress#RMCOBOL#COBOL
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.