Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all 4356 articles
Browse latest View live

Dialog System Problem (same in Netexpress5.x and Visual Cobol 3.x)

$
0
0

Who has this Problem and have been able to find a solution?

Loading in DS is not a Problem, but when starting the program and loading the screenset i become the following window with a error Messages:

 

DSRUN error 28,0,0

Incorrect Dialog System vocabulary Information is stored in the screenset.

Make shure you have generated a vocabulary copybook for this screenset.

 

I works since many years and this is the first time and i don't find a solution.

I have exported the screenset and imported in a new screenset without Errors.

Who can help?


FileShare

$
0
0

Olá, estou precisando de um exemplo para Visual Cobol 4 que faça uso de fileshare, nunca utilizei alguem tem um exemplo. E o que é necessário para sua execução? Obrigado.

 

Hello, I need an example for Visual Cobol 4 that makes use of fileshare, never used someone has an example. And what is necessary for its execution? Thank you.

"Call winapi..." fails in chained-to prog, works in called prog?

$
0
0

Hi,

CALL WINAPI "MessageBoxA", gets windows "114 Attempt to access item beyond bounds of memory:" when I CHAIN to prog below but works if I CALL the prog.

I want to chain to it when a db error occurs so that all resources are freed (file locks etc) even if user doesn't close my pop up box. I'm running within Visual studio i.e. in development environment.

I'm using Visual COBOL / Windows 10.

Thanks, Linden

 

environment division.
special-names.
call-convention 74 is winapi.
data division.
working-storage section.
01 retCode pic x(4) comp-5 value zero.
01 msgCaption pic x(255) value
z"TNL Advertising Management System Error Report".
01 uType pic x(4) comp-5 value 273. *> 305.
01 msgText pic x(1000).
01 username pic x(100).

linkage section.
01 callersMsgText pic x(1000).
procedure division using callersMsgText.

*> IF HERE THIS PROG HAS BEEN CHAINED TO, NOT CALLED, SO
*> THAT RESOURCES HELD BY CALLING PROG ARE RELEASED BEFORE
*> ABORT MSG SHOWN. HENCE IF USER DOESN'T CLOSE THIS MSG BOX
*> NO FILES ARE HELD OPEN ETC.
display 'USERNAME' upon environment-name.
accept username from environment-value.

string 'AN ERROR OCCURRED.' x'0d0a0d0a'
'PLEASE email screen print to:' x'0d0a'
'Linden Rowland ('
'TNL Ad. Management System developer)' x'0d0a'
'lindenrowland@yahoo.com'
' or contact Tindle IT.' x'0d0a0d0a'
'DETAILS:' x'0d0a'
'Windows account name: ' username x'0d0a'
callersMsgText(1:900)
x'0d0a0d0a'
'CLICK OK. TNL Ad. Management System will shut down.'
x'00'
delimited by ' ' into msgText.

initialize retCode.
perform until retCode = 1
call WINAPI "MessageBoxA"
using by value 0 size 4
by reference msgText, msgCaption
by value uType
returning retCode
end-call
end-perform.

STOP RUN.

Connect SQL database without connect statement

$
0
0

 Hello COBOL community,

 

I actually work on a project with this configuration:

- Visual Studio 2017

- Visual Cobol 4.0

-SQL Server 2014 and SSMS 2017

- Native project

 

I actually have some programs with access to a database. I use a "Connect" statement with parameters such as "Trusted_Connection","Database","factory","server".

My question is: is it possible to include all those parameters with the ADO connection assistant? I tried to configure one but when I use my exec sql statements, I have an SQLcode error.

The goal is to epurate the code of the procedure division and have a COBOL-like program.

Thank you for your answers and have a wonderful week.

 

Sebastien.

API for Cobol server managment

$
0
0

Hello,

Is there a Rest API (or shell commands) to manage regions in a Cobol Server ? For example, I would need to programmatically set the XA connector for a given region.

Thanks in advance

MicroFucus Book "Visual Cobol" A developer's guide to modern Cobol ISBN 9780692737446

$
0
0

Do MicroFocus have as download the examples from this book, so that we must not retype all code!

 

This will be perfect, when this is possible!

 

Thanks

 

cg

FileShare

$
0
0

Hello Guys, 

I would like any kind of documentation about FileShare. Someone have it ??? Not about the instalation and configuration but related with monitoring resources as "FileShare Server Monitor" (FSView) or "Fileshare Manager module" (fsmgr). I need follow the impact of the reads and puts (in another words, the performance of access) in the vsam files used in our sistem on the FileShare. 

Anyone can help us with this dout ??? And more if exist one resource like this explanation, what will be and how works. 

Thanks a lot. 

Self

$
0
0

In a .net visual cobol windows form, can a global variable be declared in working storage that references self::?

Working-storage section.

01 s as new self.

Method.

invoke s::GetNumbers().

 

I know you can use declare x = new self in the method itself, but can you declare a global variable that represents self?


Update 4.0.268 does not allow generating clients from WSDL

$
0
0

Good day,
Update 4.0.268 does not allow generating clients from WSDL.In the version 4.0 does not generate error attach screens captures and error

 

"Micro Focus Interface Mapping Toolkit v4.0.00259

Copyright (C) Micro Focus 1984-2018. All rights reserved.

An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened. Id=C:\Users\Usuario\OneDrive/ConsultaEstado.!!1

The generation of the COBOL client from WSDL failed.

Micro Focus Interface Mapping Toolkit v4.0.00259

Copyright (C) Micro Focus 1984-2018. All rights reserved.

An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened. Id=C:\Users\Usuario\OneDrive/ConsultaEstado.!!1

The generation of the COBOL client from WSDL failed."

 

 

 

How Data Scientists add value to your Business Organization?

$
0
0

Cutting-edge technology can be converted to actionable insights with the help of an expert. Today, more and more organizations are using the Big Data to increase its value and to produce more meaningful insights. Big data can process a large amount of data effectively. It is a well-known fact that modern businesses are using a massive amount of data to design their business goals and for the decision making process. It can be said in short that data is an integral part of every business organization and therefore organizations need a data scientist who can understand and process the data effectively.

We have written this blog to discuss the importance of data scientist in any organization. Many organizations even need data scientists but do not consider them as the part of their organization. So, this blog will focus on two topics – why data scientists matters or their importance for an organization and the second topic will discuss the right ways a data scientist can add value to your business organization.

String data - right truncation[32]

$
0
0

hi

I' have program that run with cobol server 4.0,

compiled with Enterpsie developer 4.0 for eclipse,

on windows 2012 and give this error:

SQLCODE: +00000001                                    

SQLSTATE: 01004                                       

SQL MESSAGE TEXT: String data - right truncation[32]  

EXPANDED TEXT: String data - right truncation[32]     

 

in odbc trace i have found thos print:

) d88-1b74 EXIT SQLDriverConnectW with return code 1 (SQL_SUCCESS_WITH_INFO)
HDBC 0x0077E868
HWND 0x00010010
WCHAR * 0x74421F7C [ -3] "******\ 0"
SWORD -3
WCHAR * 0x74421F7C <Invalid buffer length!> [-3]
SWORD -3
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

DIAG [01004] [Oracle][ODBC]String data, right truncated. (0) 

 

What can I look for?

 

thanks bye

Tasks

$
0
0

Can you do programming in visual cobol .net using await and Task operators? I have a very simple method below and wish to use async, Task and await operators.  Is this possible in a windows form application?

 

method-id CreateUser(username as string) returning a as type Task[condition-value] async


end method.

Visual COBOL 3.0 and TERM environment variable on linux

$
0
0

How do I get Visual COBOL runtime to accept  a blank or generic TERM environment variable?

 

All of our COBOL programs run on Linux with no user session (started by cron or other daemon processes).  All of these programs have stdout redirected to log files and use the "DISPLAY" statement to put info into the log files.

 

Most of this works fine, but in a few cases (and I cannot see anything special about the DISPLAY statements) I get a message like 

 

com.microfocus.cobol.program.COBOLRuntimeException: 191     Terminal type not defined [ts236h (while in native code - see cause for more information)]

 

There is no TERMINAL per se, so I just want the DISPLAY the string.

 

The last line in the log file before the error is from this source line

 

display 'values returned to topend: ' out-detail-tbl.

 

where out-detail-tbl look like.

 

       01  out-detail-tbl.
           05  dtl-div-nr                      pic x(3).
           05  dtl-div-name                    pic x(31).      
           05  dtl-div-ltr                     pic xx.
           05  dtl-reg-id                      pic xx.

 

this DISPLAY occurs in a loop which should occur 19 times, but only occurs once.

 

If I run the program (unchanged) from Linux logon session instead of launching it from the daemon , it works.

Tutorial or example for calling a URL and processing the response

$
0
0

I was wondering if there is a tutorial or example for calling a URL and manipulating the response.

Eclipse precompile cobol-source with gcc not working

$
0
0

the precompile-step   "P(gcc) -E -P -x c  -I/home/max/workMax/include ENDP"

gets always the error "COBCH0018S Preprocessor error on initialization"

Any idea, what went wrong?


Creating a Web application using Visual Cobol

$
0
0

The tutorials for creating a web application with visual Cobol state I must select WEB under the COBOL template. The only options I have are Managed and Native.

What do I need to install to get the WEB option?

Thanks

Shirley

"cob32: Compilation and code generation of COBOL not supported in this product" error

$
0
0

Dear Admin,

Currently I meet this error in my local cobol env, any suggestion on it? Very appreciated with your help,thanks!

honey:/var/cics_regions/TEST/bin # cob -u GSYSTIME.cbl -C DATA-CONTEXT -C CALL-RECOVERY
cob32: Compilation and code generation of COBOL not supported in this product.

#I am using Micro Focus Visual Cobol 3.0 on 64bit x86 Linux SUSE12sp3
#It says that: "cob32: Compilation and code generation of COBOL not supported in this product",
while the cob32 is already under directory /opt/microfocus/VisualCOBOL/bin

honey:/opt/microfocus/VisualCOBOL/bin # ls -lrt|grep cob32
-r-xr-xr-x 1 root root   80228 Jun  8  2017 cob32

#I have already done these COBOL env variable settings.
honey:~ # echo $PATH
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/opt/ibm/cics/bin:/root/bin:/opt/microfocus/VisualCOBOL/bin:/root/bin:/opt/ibm/cicstg/jvm180/bin
honey:~ # echo $COBDIR
/opt/microfocus/VisualCOBOL
honey:~ # echo $LD_LIBRARY_PATH
/opt/microfocus/VisualCOBOL/lib:/opt/ibm/cics/lib:/lib

.net convert

$
0
0

Can anyone convert this to visual cobol .net.  I am having trouble with the byte array.

 

using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider())
{
      byte[] buff = new byte[Convert.ToInt16(saltsize)];
      rng.GetBytes(buff);
      return buff;
}

 

What i have thus far is

local-storage section.
01 buff type Byte[] occurs any.

perform using rng as type RNGCryptoServiceProvider = new RNGCryptoServiceProvider
       set buff to buff[type Convert::ToInt16(saltsize)]
end-perform

Extension Methods

$
0
0

 Are extension methods still recognized in the latest visual cobol for .net?  I have a very simple ext method I am trying out and it does not seem to be recognized.  I keep getting the error Undefined Error Contact Tech Support.  I have a static extensions class like this.  

class-id Extensions static.

 

Method-id CountWords(str as string) returning result as binary-long extension static.
    declare #words as string occurs any = str::Split(' ')
    set result to size of #words
end method.
End class.

 

 

Then my calling method is in another class like this.

Method-id SomeMethod()

declare a as string = "Mary"
declare b as binary-long = a::CountWords

End method.

 

Intellisense does not recognize CountWords as an extension and I get the error noted above.

NetExpress programs and Visual COBOL programs on the same computer

$
0
0

I have existing programs compiled using Net Express that I run from a shared folder on a file server and I have programs compiled using native Visual COBOL which I run from a shared folder residing on a COBOL Server.  How do I run the native Visual COBOL programs on a computer where the user is also running Net Express programs?  Since all of the runtime files are on the COBOL Server, can I run a batch file or something to set the PATH environment to run the Visual COBOL programs?  When I try now I receive a message that says "The program can't start because api-ms-crt-runtime-l1.dll is missing"  When I copy one of the 20 instances of api-ms-crt-runtime-l1.dll from another computer into my COBOL Server folder containing the EXE file, I receive a message saying "entry point ucrtbase.abort cannot be found in dynamic link library api..."   How do I get the files that I need onto the COBOL Server?

On computers that do not run Net Express programs, the native Visual COBOL programs run without these messages.  I am running them using at Batch file that pre-pends the COBOL Server folders to the PATH environment variable.

rem --------------------------------------------
rem   batch file to run Visual COBOL programs
rem --------------------------------------------
PATH=\\SQLPRDSVR1\COBOLServer\bin;\\SQLPRDSVR1\APPS\COBOL\BIN;%PATH%
TMS010DV.exe SC
pause

Viewing all 4356 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>