Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: Is there a way to use a reserved COBOL word as a paragraph name? Resolution: Yes. Include the reserved word in the REMOVE list. Use the compiler directive REMOVE"<reserved-word>". For example, to use a paragraph name using the reserved word "LEFT-JUSTIFY", use the following compiler directive: REMOVE"LEFT-JUSTIFY", then name the paragraph "LEFT-JUSTIFY" in the source code. Old KB# 1558
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: 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: 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: 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: 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: 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: 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: You may have installed Server Express and are trying to have cobol and Java working together. However, when you try to run one of the test programs you get the error: Sorry unable to load libcobjvm_java2 Resolution: If libcobjvm_java2 is on shared library PATH, then ensure 'libjava' and 'java' are found on the PATH/<Shared Library> PATH. Check to see that COBJVM is set. Below is an extract from the online manuals: COBJVM Specifies which Java Virtual Machine (JVM) to load. Syntax: COBJVM=platform_nnn export COBJVM Parameters: platform_nnn platform is a three-character code that indicates the platform on which you are running Server Express, for example: ibm IBM AIX unx SCO UnixWare sun Sun SPARC nnn indicates the version of the JVM, for example: 122 Version 1.2.2 130 Version 1.3.0 Comments: You might need to set COBJVM if you are developing distributed applications wit
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: 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: 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: MFSupportInfo has been part of Net Express since version 5.0, and the file can be found in the BIN directory. It however does not produce the log file when it is executed. A black screen just flashes by. Resolution: User Account Control (UAC) is a new feature in Windows Vista to prevent malicious programs from damaging a system. One of its tasks is to protect system settings from being changed without the user's knowledge. UAC then prompts the user when certain activities are about to occur, such as installing or uninstalling a program, configuring Automatic Updates, copying or moving files into the Program Files directory or Windows directory, etc. MFSupportInfo is designed to produce a log file in the current folder, and since Net Express is installed by default in the Program Files directory where UAC has under guard, the log file cannot be produced. This problem does not occur if Net Express is installed in a different location other than Progra
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
Problem: The FDCLEAR directive will clear the record buffer area after every Write operation Resolution: The syntax for the FDCLEAR directive is: FDCLEAR "[1 or 2]" NOFDCLEAR Specifying the integers 1 or 2 will: 1 Specifies that the record buffer for a file should be cleared after every write operation. The buffer is cleared to the value specified by the DEFAULTBYTE directive. 2 As for 1, but the record buffer is also cleared after the initial OPEN statement. Comments: The FDCLEAR directive is effective while the SELECT clauses are being processed. Use $SET statements before and after each SELECT clause to apply this feature to selected files. Alternatively, use it once before processing any SELECT statements to apply it to all files in a program. The FDCLEAR directive is ignored for files subject to a
Problem: When attempting to animate a program, the screen goes blank and then control returns, that is, nothing apparently happens. This occurs both when compiling from the command line, or when using 'F4 Animate' from within SDE/Toolbox. Alternatively, when attempting to animate from within SDE/Toolbox, a message appears: ERROR: File incompatibility Resolution: The solution is that the program for which animation is being attempted is a .gnt, but it has not been compiled for animation. By default a .gnt will be found in preference to an .int, so if both exist, the .int will not be used, *unless the extension is explicitly specified*, which can be done both from the command line, or by filling in the complete filename from within SDE/Toolbox, as seen below: Animate****************************Non-Threaded**************Ins*Caps*Num*Scroll F1=help F2=dir F3=switches F4=threads &nb
Problem: How can you access the System Colors in a .Net Application ? At runtime you may want to determine for example the system color that is used for a Window background or an active caption. Resolution: The color class has a FromKnownColor method that allows you to retrieve the required colors. Attached to this KB is a demo showing how to use this method. Please see the Visual Studio documentation on the color class for more information. Attachments: TextBoxBackGroundColors.zip Old KB# 1549
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.