Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: the pointer lpszQueryString retrieved by the MF function PC_ISAPI_GET_EXT_BLOCK retrieves A null-terminated string that contains the query information. This is the part of the URL string that appears after the question mark (?). This is equivalent to the CGI variable QUERY_STRING. Resolution: use the MF Function "PC_ISAPI_GET_EXT_BLOCK" ... working-storage section. ... *> Enter additional working-storage items here 01 ext-block usage extension-control-block. 01 option-name pic x(255). 01 option-value pic x(255). 01 temp-1 pic 9(9) comp-5. 01 MSG-INFO pic x(60). 01 DWORDdisp pic 9(18). &n
Problem: Return code 9/029 on DELETE of index file over Fileshare Before the delete a close was coded Resolution: This normally is correct in that your program was not the only one that opened the file and the file is open via another program that never If Fileshare is started via service, you will need to use FSVIEW from Net Express command prompt. The trace will write to fsscreen.lst in the fileshare work directory. FSVIEW server set your-server-name trace toggle to start trace trace toggle to stop trace exit to exit After the error is recreated make a copy of the fsscreen.lst file. Using an editor do a search for the file name you are having problems with in the sample it was D:\\M.LEATHEM\\CNTLLIB\\MHCT_MHCBQ.DAT so I searched for MHCT_MHCBQ.DAT. Just before the
Problem: If a user has created a .dat file from a Net Express application and then attempt to open\\update the file from a .NET Web Service, a 3/7 access denied error message returned from the service. Resolution: This is usually due to anm ASP.NET permissions issue, as the .dat file was created outside of .NET. To set the correct permsiisons on the file in order to allow the Web Service to update it, the following must be done: In explorer, bring up the properties for the data file, and select the security tab. Click Add and type YOURMACHINENAME\\ASPNET (where YOURMACHINENAME is the name of your PC) then click Check Names. This should resolve to YOURMACHINENAME\\ASPNET. Now OK the dialogs and back at the Security tab, make sure ASPNET has full control over the file. You'll also need to do the same on the associated .idx file. Run the .NET Web Service and check that you can now update the file successfully. Old K
Problem: If your OpenESQL application utilises Dynamic SQL using SQLDA, thenthis is not currently supported under .NET if compiling with the SQL(DBMAN=ODBC) directive (which is the default for the SQL directive). Resolution: If you need to utilise this functionality, you will need to maintain the appropriate modules as unmanaged code, i.e. running as .int, .gnt, .dll or .exe outside of .NET. Old KB# 3790
Problem: How to do a multi-file select dialog box in Dialog System. Resolution: How to do a multi-file select dialog box in Dialog System. Since the DSDIR Dialog System extension only allows a single file to be selected, you can use the GUI Class Library OpenDialog class. This class has a method "allowMultipleSelection" which sets a flag in the open dialog that allows you to select multiple files. You may not see this method listed in the class library help, but you'll see it in Net Express\\base\\source\\guicl\\opendlg.cbl. You can then use the "getAllfiles" method to retrieve the selected files. Please see the source comments in the attached example. Attachments: multifiles.zip Old KB# 3794
Problem: When calling the WinAPI function CreateProcess returns a zero value, this means the function failed. Resolution: Review the following details: the number of parameters the order of parameters (**command line is the 2nd parameter) the size of parameters the command line is null-terminated the function name is prefixed with "A", i.e. CreateProcessA the function is called with call convention 74 the program is compiled with CASE and DEFAULTBYE(00) directives Old KB# 3803
Problem: In .Net WinForms how can you append text to a multi line textbox control. Resolution: To do this you need to append text to the string and new hex ODOA (Carriage Return Line Feed) as the terminator for a line. The code required is something like:- 01 ws-newline pic x(2) value x"0d0a". set self::"textBox1"::"Text" to class-string::"Concat"(textbox1::"Text",ws-newline,"This is a another line.") You just need to concatenate the strings together. Old KB# 3801
Problem: You may have installed Net Express with .NET support, and is now want to call a legacy system .dll from a .NET application. Resolution: The legacy system .dll is termed "unmanaged" code, as it has not been created from within the .NET environment. You need to add the .dll as a reference in your .NET project. Go into Help in your .NET project and select 'Contents', 'Micro Focus Studio', 'Programming', 'Interoperability', 'Interoperability Overview', and select the link to 'Interoperating with Unmanaged COBOL'. This gives several options, including such things as creating and registering COM objects etc. The easiest way would be the method suggested under the heading 'Using Platform Invoke to Call Unmanaged COBOL'. Old KB# 3823
Problem: Release 4.0: The following COBOL code gets compiled without any ERROR - PERFORM PERFORM Paragraph-Name - IF Field NOT = TO SPACE The compiled code runs without any error and there is currently not really a issue with the execution. However, the customer is developing for the Mainframe (Bull GCOS7) and when the coding is brought back to the Mainframe the compiler does not allow to compile the above lines as they are not valid COBOL code. Can this be addressed in a future fixpack ? Resolution: No, it seems there are bugs while compiling this under Net Express 4.0, but 1) nested PERFORMs are allowed. 2)" = TO" is a peculiarity of the OSVS mainframe, so Micro Focus allow it too. Look up 'Relation Condition' in the Net Express COBOL language documentation: > OSVS: Note that " = TO", "> THAN" and "< THAN" are accepted. < Old KB# 3833
Problem: Release 4.0: We are on the way of migrating our OS/390 CSP-written programms to Cobol using Micro Focus Net Express. So far so good, now comes a nasty 166 error saying: "RECURSIVE COBOL CALL is illegal." The situation is as follows: start pgm -----> pgma -----> pgmb -----> pgmc (PF3) -----> pgma call call call call &nb
Problem: Some environment variables may have been set for some reasons from Windows registry or set as system and user variables. How can you override them? Resolution: You can override the values of existing environment variables by setting them with new values. If you are using the Net Express command prompt to compile, you will first need to set new values for these environment variables to override the default values. If for example, you have set COBCPY to point to x:\\copybook from the Windows registry. This would be appended along the other directories that Net Express will set. Net Express usually sets COBCOPY with the following directories: "C:\\Program Files\\Micro Focus\\Net Express 4.0\\DialogSystem\\SOURCE";"C:\\Program Files\\Micro Focus\\Net Express 4.0\\Base\\SOURCE";"C:\\Program Files\\Micro Focus\\Net Express 4.0\\Base\\SOURCE\\GUICL";"C:\\Program Files\\Micro Focus\\Net Express 4.0\\Base\\SOURCE\\BASECL";
Problem: Return code -2108 on a prepare statement (dynamic sql using Oracle 10g) ORA-02108 PCC: invalid descriptor passed to run-time library Cause: This internal error typically indicates a memory-related error. Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations. Resolution: Was passing the sql statement in a group level item setting the 49 level for length and data part. Changed the prepare to only pass the data part and that resolved the error. For dynamic sql and oracle either use a host variable using the varying clause where you set the data and length or use a pic x(nn). 49 levels are not valid for Oracle. Old KB# 3789
Problem: how to create a new task in the task list for VS 2005 Resolution: Put the cursor on the line of code where you want to enter a task. Then go to Edit | Bookmarks | Add Task List Shortcut. Then go to View | Task List. In the Task List make sure 'Shortcuts' is selected in the drop down, then add your task description. Old KB# 3796
Problem: When sorting, the table is sorted by uppercase first, then lowercase: ALPHA BETA Alpha Beta and to attain the following output: Alpha ALPHA Beta BETA Resolution: object-computer. pc program collating sequence is alpha-1. special-names. alphabet alpha-1 "A" also "a" "B" also "b" "C" also "c" "D" also &qu
Problem: We are moving a host applicaiton to PC environment, but 'Record Contains 0 Characters' is being flagged. The same program compiled and ran fine on the MVS host. The program could open and read datasets of varying lengths without modifications. Net Express gives a bad file status code of 3904. Is there a way to have this work in Net Express without a host dialect? Resolution: This is an IBM extension. They document this: ---------- Enterprise COBOL for z/OS and OS/390 Language Reference Version 3 Release 2 Document Number SC27-1408-01 http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/5.2.5.1?SHELF=&DT=20020920180651 Format 1 specifies the number of bytes for fixed-length records. ___ Format 1 _______________________________________________________
Problem: CBL2XML, using fonction "convert COBOL to COBOL with XML syntax" generates a warning "Warning : The redefines clause is not supported by this version of the COBOL runtime..." when the COBOL COPYfile to be "converted" to XML contains REDEFINES clause(s) Resolution: ...Let's say you have such a COPY file: 01 LEV1-rec. 02 AnyData pic x(100). 02 AnyDataRed pic x(100) redefines AnyData. ...AND you use CBL2XML to "convert COBOL to COBOL with XML syntax" ie: generate an XML copy file describing the XML file ...YOU'LL GET THIS WARNING Micro Focus CBL2XML Version 1.0 Copyright (c) 1984-2005 Micro Focus International Ltd. Checking ...\\ACobolCopy.cpy for errors Micro Focus Net Express V4 Version 4.0.38 Copyright (C) 1984-2005 Micro Focus International Ltd. URN AXCGG/AA0/00000 * Checking complet
Problem: The ANY LENGTH Clause --- extract of Netx DOCumentation: The ANY LENGTH clause specifies that the length of a linkage section item may vary at runtime and is determined by the length of the argument. General Format ANY LENGTH Syntax Rules The ANY LENGTH clause must be specified only in an elementary level 1 entry in the Linkage Section of a function, of a contained program, or of a method that is not a property method. Note: The ANY LENGTH clause is not permitted to be specified in an outermost program. This is because an outermost program can be called with or without a program-prototype format CALL statement. For calls without a program-prototype, the implementation is not able to determine whether an argument corresponds to a formal parameter described with ANY LENGTH. If the source element containing the ANY LENGTH clause is a contained program or is a method, the subject of the entry must be referenced in its PROCEDURE DIVISION head
Problem: Moving SW-HIDE to wShowWindow of StartupInfo should cause the application that is executed with CreateProcess to be hidden, but it does not. Resolution: Here is a description of sShowWindow from Microsoft's MSDN site: ------------------------- wShowWindow Ignored unless dwFlags specifies STARTF_USESHOWWINDOW. The wshowWindow member can be any of the SW_ constants defined in WINUSER.H. For GUI processes, wShowWindow specifies the default value the first time ShowWindow is called. The nCmdShow parameter of ShowWindow is ignored. In subsequent calls to ShowWindow, the wShowWindow member is used if the nCmdShow parameter of ShowWindow is set to SW_SHOWDEFAULT. ------------------------- The above indicates that the value for STARTF-USESHOWWINDOW (i.e. h"00000001") must be moved to dwFlags. Otherwise, wShowWindow is ignored. This value can be found in ...\\[Net Express directory]\\Base\\SOURCE\\Windows.cpy. Old KB# 3804
Problem: By default, the tab and back tab pass the cursor to the next field if you are accepting a screen with several fields. By default, pressing tab in the last field of an accept gives you an error message that there are no more fields and it doesn't terminate the accept... The same happens with the back tab key (shift tab), it makes the cursor to go back to the previous field, but when you are in the first field of the screen, it gives you a "no further fields" error message and it doesn't terminate the accept. This article explains what you would need to do if you want to control the behavior of the tab and back keys for example, to implement a "circular" behaviour where pressing the tab key in the last field makes the cursor to go back to the first field and pressing the back tab key in the first field positions the cursor in the last field. Resolution: You can change the default behavior using adiscf and keybcf from a N
Problem: How can I register JScript in ASP.Net using RegisterOnSubmitStatement in COBOL ? RegisterOnSubmit allows you to register client side JavaScript code from your COBOL running on the WebServer. Resolution: There is a demo attached to this. It adds some Java Script that gets triggered when a button is pressed. The code that registers script is:- method-id. "Page_Load" is protected. local-storage section. 01 clntscriptname string. 01 clntscripttype cType. 01 scriptman cClientScriptManager. 01 scripttext &n
Problem: When the statement "EXEC SQL INCLUDE aFile END-EXEC" is used, ORACLE precompiler PROCOB looks for a file named 'Afile.cob' on the current directory AND, if not found on the current directory, looks for it on DIRECTORIES pointed by the environment variable INCLUDE. How to manage ORACLE precompiler PROCOB to find these files despite they don't have the cob extension? Resolution: Use the Micro Focus CP Preprocessor so COPYFILEs are "expanded" before ORACLE precompiler has to deal with them ( ie: since CP will have expand COPYFILEs, procob won't have to look for them....) Sample Paste of Net Express directives of a Net Express project: %FILENAME COBIDY(%TARGETDIR) WB3 WB CSI ANIM EDITOR(MF2) ENSUITE(3) PREPLIST LIST() osext"pco" copyext"cob,pco,cbl,cpy" p(cobsql) csqlt=ora8 makesyn end-c comp-5=yes p(CP) C S T W ENDP; Note that, since the Prep
Problem: How do I specify a user and password on an SMTP email send from .Net Resolution: To do this you need to use the "Fields" collection property of the MailMessage object. You can set the Authentication Type userid and password parameters. An example program that does this is:- $set sourceformat(variable) *> Allows past col 72 program-id. SendMail. environment division. configuration section. repository. class cMailMessage as "System.Web.Mail.MailMessage" class cMailAttachme
Problem: This COBOL syntax uses the SPECIAL REGISTER TALLY: inspect Avariable tallying TALLY for all space TALLY SPECIAL REGISTER is usable ONLY WHEN Compiler directive OSVS or VSC2 is set Extract of Net Express on-line help using the keyword TALLY special register: !!!!!! OSVS or VSC2 have to be set * TALLY 9(5) COMP * The TALLY special register contains information produced by the EXAMINE...TALLYING statement. * It is valid as a data-name in a Procedure Division statement wherever an elementary data item can be referenced. Resolution: *SET VSC2 $SET OSVS IDENTIFICATION DIVISION. PROGRAM-ID. TESTtally. ENVIRONMENT DIVISION. DATA DI
Problem: When you have a 'read only' field and you jump from one field to the next within your program, the cursor will still jump into this 'read only' field as well and not to the next field. Is it possible to jump over the read only field straight to the next read/write field? Resolution: This behaviour is as expected. It's part of the Windows functionality. Even thought you cannot change data in a 'read only' field, you still might want to be able to copy the data inside and therefore you need to be able to got in this field for copy purposes. If you really would like to jump over this field to the next read/write field, you need to change this to for example a 'read only' display field. That way it will only 'display' the contents. However you won't have a box/frame so you might want to draw it around yourself. Old KB# 3765
Problem: How can you run animserv and animserv_t on a specific port, rather than using the default? Resolution: Use the syntax animservXX port=xxxxx or animservXX_t port=xxxxx(where XX is either 64 or 32) N.B. do not use ports from 0-1023. This are privileged ports only accessible by root.Old KB# 3704
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.