Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: How do I resolve an error compiling my SQL application? How do I resolve an error compiling my DB2 application? How do I resolve an error compiling my XDB application? Compiling with Cobsql returns CSQL-F-016: Unix error Compiling with Cobsql returns CSQL-F-015: Dos error Compiling with Cobsql returns CSQL-F-014: Windows error Note that this article applies to both Net Express and Server Express. Resolution: Note that this article applies to both Net Express and Server Express. If using either Cobsql or compiling with the DB2 directive -- i.e. to use the DB2 ECM -- and your application doesn't compile, in order to isolate whether the problem lies with either Micro Focus software or the RDBMS precompiler, we suggest that you precompile the application using the Database vendors' command-line precompiler, i.e. * IBM DB2 : db2 prep ... * Oracle : procob ... * Infor
Problem: It may happen that an ISAM file is corrupted and needs to be rebuilt, but when the rebuild utility runs not all records are returned. Resolution: This could be caused by a physical corruption in the data (.dat) portion of the file. A "rebuild MyFile.dat" only builds a new IDX file and keeps the DAT file unchanged. Use the rebuild with InFile and OutFile and the option /d to rebuild a corrupted data file: REBUILD.EXE Infile,Outfile /d Old KB# 4247#netexpress#ServerExpress#RMCOBOL#AcuCobol#COBOL
Problem: This demo shows how to place the cursor at the end of a Dialog System entry field. Resolution: INTRODUCTION ========== This demo shows how to place the cursor at the end of a Dialog System entry field. By default the cursor appears at the beginning. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- TEST1.CBL Dialog System control program. DSCSRPOS.CBL Utility program that moves the entry field cursor. Copy Files: ------------------- ----------------------------------------------------------- TEST1.CPB Example Dialog System screenset Datablock copybook. Form Files:
Problem: Is it possible to send an HTTP Request to a Web Server which contains an XML file as the message to be sent by using Net Express with .Net and the HttpWebRequest and HttpWebResponse .NET Framework classes. Here is an example program written as a COBOL console application: Resolution: $set sourceformat"variable" program-id. Program1 as "testhttppost.Program1". environment division. configuration section. repository. class HttpWebRequest as "System.Net.HttpWebRequest" class HttpWebResponse as "System.Net.HttpWebResponse" &nb
Problem: Release 4.0: Below is a snippet of code produced by the OpenESQL Assistant. Some lines of code are included beginning with 'MOVE..'....but seem to have have been inserted incorrectly and should not be there: EXEC SQL DECLARE CSR12 CURSOR FOR SELECT "A"."T$CONO" ,"A"."T$PTYP" ,"A"."T$YEAR" ,"A"."T$PRNO" &nbs
Problem: The Dialog System "Color Selection" dialog box for setting colors of controls has a very limited selection of colors to choose from. To get a more varied selection of color choices, you can use the Micro Focus GUI Class Library. This means that you will have to add extra Dialog code for each control that you want to color by way of the class library. Resolution: INTRODUCTION ========== The Dialog System "Color Selection" dialog box for setting colors of controls has a very limited selection of colors to choose from. To get a more varied selection of color choices, you will have to make use of the Micro Focus GUI Class Library. This means that you will have to add extra Dialog code for each control that you want to color by way of the class library. To enable use of the class library from within Dialog System, add the following code to the SCREENSET-INITIALIZED event in Screenset...Global Dialog: CLEAR-CALLOUT-PARAMETERS $NUL
Problem: This demo shows how to swap the focus from a Dialog System window to a COBOL text window. Resolution: INTRODUCTION ========== This demo shows how to swap the focus from a Dialog System window to the COBOL text window. This is important when you have an application which is made up from a mixture of GUI and character forms. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- TEST1.CBL Main program which calls Dialog System. SPROG1.CBL Example sub-program 1. SPROG2.CBL Example sub-program 2. TEST1.GS Dialog System screenset. Copy Files: ---------------- ------------------------------
Problem: In some versions of COBOL (namely AS/400) calling an array and setting the table index to zero works. However, in Micro Focus COBOL this returns an error ("153 subscript out of range") as the default value is set to one. In order to maintain compatability with other mainframe dialiect it is possible to modify the default setting to zero. Resolution: A program would compile correctly with the default directives: 1 ind-2 usage index. 1 t1 occurs 10 indexed by ind-1. 3 pic xxxx comp-5. set ind-1 to 0 set ind-2 to 0 Old KB# 4269
Problem: A Cobol program is running under ES/JCL with Connect to UDB through XA. It calls a C (.dll) which includes embedded SQL. How must the C module be compiled and linked ? Resolution: Linking an operational "C" module as a .dll can be achieved through the Net Express Build process. Just add the object code produced by the "C" compiler to the project, and create a package type .dll from the .obj. In order to enable embedded SQL you need to include db2api.lib into the .dll. Please ensure that the CBLLINK utility also creates a .lib library and is exporting the entry points .exp. Old KB# 4268
Problem: This shows how to use the MOUSE-OVER event when NLS is present. Resolution: INTRODUCTION ============ This program demonstrates the use of the mouse-over event in dialog system SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- Testnls.cbl This program sets up the coblang environment variable before the call to dialog system Testnls.gs This is the screenset that shows the use of mouse-over. Copy Files: ---------------- ----------------------------------------------------------- testnls.cpb &nb
Problem: This demo shows how to prevent users from using the mouse right-click to go "back" to previous page for example Resolution: INTRODUCTION ========== How to prevent users from using the mouse right-click to go "back" to previous page for example? This has to be done with JavaScript. Please bear in mind that this is NOT fool-proof! ****** This script is *NOT* fool-proof. People can disable JavaScript support in their browser, use a browser which doesn't support JavaScript, or use a browser to link directly to the image that you want to protect. Also the pages and images are normally stored in the user's browser cache (for viewing later whilst offline) - with a little bit of work, the thief could find your image in their cache. It also doesn't stop users accessing the source of your page from the toolbar menus (View | Page Source). You could attempt to load your page into a window without toolbars - but again this isn'
Problem: This sample show how to trap Function Keys events - F3 & F10 in this sample - before Windows does. This is achieved by sub-classing the object (e.g. entry field) where the F10 or F3 should be intercepted. ***This demo can also be used to trap any keys, not only Function keys. Resolution: INTRODUCTION ========== Pressing the F10 function key activates the menu and F3 function key to exit screen in Windows. This sample show how to trap these events before Windows does. This is achieved by sub-classing the object (e.g. entry field) where the F10 or F3 should be intercepted. ***This demo can also be used to trap any keys, not only Function keys. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- NewSet.cbl Prog
Problem: This demo shows how you can create a Windows control panel application using Net Express and Dialog System. Resolution: INTRODUCTION ========== This demo shows how you can create a Windows control panel application using Net Express. SOURCE FILES: ========== Program Files Description -------------------- ----------------------------------------------------------- CPIApplet.cbl controlpanel.cbl Copy Files: -------------------- ----------------------------------------------------------- commdlg.cpy mfres.cpy minwin.cpy winbase.cpy winclass.cpy winerror.cpy wingdi.cpy winnls.cpy wintypes.cpy winuser.cpy controlpanel.cpb mfres.h DS Screenset: -------------------- ----------------------------------------------------------- controlpanel.gs Resource Files: ----
Problem: This application demonstrates a method of using both Dialog System GUI screensets and character based console screens within the same application. Resolution: INTRODUCTION ========== This application demonstrates a method of using both Dialog System GUI screensets and character based console screens within the same application. The program PROG1.EXE is the main executable which is linked as a character based application. (Look in IDE/Project/Build Settings/Link/ General). The program SHOWCONSOLE is a subprogram whose .OBJ file is linked into both PROG1.EXE and PROG2.DLL. It contains the following callable entry points: - "hideconsole": hide the console window which is created when PROG1.EXE is started. Everytime this entry point is called the window will be hidden. - "showconsole": make the console windo
Problem: This demo shows how to create a splash screen window for your Dialog System application. Resolution: INTRODUCTION ========== This demo shows how to create a splash screen window for your Dialog System application. A 16-color bitmap was used on a dialog box as the splash screen. The bitmap is stored in a resource dll (bmp.dll). See the Dialog System Help, Contents tab, "Bitmaps, Icons and Mouse Pointers", "Adding Your Own Bitmaps" section to see how to do this. 256-color bitmaps cannot be placed within a dll and used by Dialog System. However, you can load the bitmap into Microsoft Paint and do a "Save As", where you can change the "Save as type" to 16-color bitmap. Dialog System is able to use the bitmap by way of the resource dll through the use of a bitmap/icon sidefile. This is a text file that you can create and specify in the Dialog System Options menu, Resource files...,Icon/Bitmap file. Be sure not to speci
Problem: The sample demonstrates how to create a Dialog System screenset which uses the Themed Controls of the XP Visual Style. Resolution: INTRODUCTION ============ This application demonstrates a method of using the Visual Style (XP-Style) controls in a Dialog System Application. REQUIREMENTS: ============= The APP requires Net Express 4.0 or a higher version. The demo should run on all Win 32 systems but will show the visual style only on Windows XP and later systems, where the visual style layout is activated. The Visual Style requires an EXE build of the start program, because the resource file must be linked in. I.e. it will not show the visual style in an INT or GNT build. OPERATION: ======== The Visual Style: -------------------- The same base name has to be used for the .RC resource file and for the EXE. The resource file can be edited using a text editor like notepad. Refer to the manifest file within the resource file. The NoBorder
Problem: This example illustrates how to use dsdir.obj/.gnt in your COBOL Dialog System application. Buttons defined within the File menu are used to collect and return Resolution: INTRODUCTION ============ This example illustrates how to use dsdir.obj/.gnt in your COBOL Dialog System application. Buttons defined within the File menu are used to collect and return information to the main program. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- NewSet.cbl Example program using File menu buttons. Open and Save to collect filenames for file processing. OPERATION: ========== When I started Dialog System to create a n
Problem: This demo shows the use of the Dialog System extension DSMOVSZ to query and restore the window's position and size. Resolution: INTRODUCTION ========== This demo shows the use of the Dialog System extension DSMOVSZ to query and restore the window's position and size. First, the COBOL program verifies if SaveWinSize.ini exists. If it does, it will read in the window size and position and will use DSMOVSZ to restore the window. Each time the user is exiting the screenset, the window's position and size are queried using DSMOVSZ, and the Cobol program will write them to SaveWinSize.ini. SOURCE FILES: ========= Program Files Description ---------------------------- ----------------------------------------------------------- SaveWinSizeNX31.APP Net
Problem: The following question was received from a customer: On the mainframe, we add 4 bytes to the sorting position for variable length sequential files. It looks like we should NOT do this when we are sorting Microfocus variable length sequential files. Can you confirm that this is the case? Resolution: Yes, this is the case. The file characteristics are deduced from the file itself for variable length and indexed files, so there is no need to add the 4 extra bytes. Old KB# 4259#RMCOBOL#netexpress#AcuCobol#COBOL#ServerExpress
Problem: NLS DS demonstration Resolution: INTRODUCTION ========== This example program demonstrates how to use the National Language Support (NLS) features provided by Net Express and Dialog System. This allows you to create Dialog System screenset files whose text fields will automatically be converted at run-time between 2 or more different languages, i.e., English, French, Spanish, etc. This is done by creating the screenset using a default language, such as English, and then saving all the screenset text to a NLS file where it can then be translated into other languages. The NLS files are standard ASCII text files that store each different text string within the screenset as a separately numbered line with the text string stored between quotes. Example: $set 1 1 "DS NLS Support" *> Text for Window title. 2 &nbs
Problem: This demo shows you how can you place a bitmap as a background on your windows. This demo uses bitmaps of 16 colours, 256 colours and 24 bits colours. Resolution: INTRODUCTION ========== This demo shows you how can you place a bitmap as a background on your windows. This demo uses bitmaps of 16 colours, 256 colours and 24 bits colours. SOURCE FILES: ========= Program Files Description --------------------- ----------------------------------------------------------- bitmapdemo.cbl Simple COBOL program that loads bitmapdemo.gs Copy Files: --------------------- ----------------------------------------------------------- bitmapdemo.cpb copy file generated with Dialog System. Resource Files: ----------
Problem: This demo shows how to Get, Set and Redraw a Dialog System window using Win APIs Resolution: INTRODUCTION ========== This sample demonstrates how to change the attributes of a Dialog System dialog box...in this case, to make the dialog box sizeable by changing the window style. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- sizedlg.cbl Main program source file. sc.cbl Subprogram that changes the attributes of the window passed to it. Copy Files: ---------------- ----------------------------------------------------------- ds-cntrl.mf Dialog System control block. si
Problem: Error codes delivered by CBL_ routines: Byte-stream File Routines: CBL_CLOSE_FILE, CBL_CREATE_FILE, CBL_FLUSH_FILE, CBL_FREE_RECORD_LOCK, CBL_GET_RECORD_LOCK, CBL_OPEN_FILE, CBL_READ_FILE, CBL_TEST_RECORD_LOCK, CBL_WRITE_FILE File and Filename Routines: CBL_CHANGE_DIR, CBL_CHECK_FILE_EXIST, CBL_COPY_FILE, CBL_CREATE_DIR, CBL_DELETE_DIR, CBL_DELETE_FILE, CBL_DIR_SCAN_BEGIN, CBL_DIR_SCAN_END, CBL_DIR_SCAN_READ, CBL_GET_CURRENT_DIR, CBL_JOIN_FILENAME, CBL_RENAME_FILE, CBL_SPLIT_FILENAME, PC_FIND_DRIVES, PC_READ_DRIVE, PC_SET_DRIVE ... Resolution: Customers sometime ask SupportLine, what does this "14-thousand-somewhat"-RETURN-CODE or status mean, which is delivered by a CBL_Routine. This knowledge base article should be found by the Google search when a status like "14657" is entered. ----------------------------------------------------------------------------- For all these routines, if the routine is successful
Problem: The default stack allocation for Windows programs is 1MB. How can this be increased? Resolution: If you want to increase that for your executable program (if, say, it has a very large local-storage section) you can set the LINK environment variable before linking and the linker will set the appropriate property: SET LINK="/stack:10000000" If you need to increase stack allocation for a program that's already linked you can use the Windows editbin utility: editbin /STACK:10000000 myprog.exe Old KB# 4253
Problem: This example demonstrates the use of the Win32 SDK ODBC functions to get information about installed ODBC drivers. Resolution: INTRODUCTION ========== This example demonstrates the use of the Win32 SDK ODBC functions to get information about installed ODBC drivers. This example uses the direct ODBC function calls instead of using the Net Express OpenESQL preprocessor. This program will display a list of all ODBC drivers installed on your system and will then open a connection to the Net Express Sample1 DSN and display information about it. This sample DSN is installed along with the Net Express demo programs. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- ODBCINFO.CBL Program that calls the ODBC functions. SQLFUNC.CPY &
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.