cobol

Setting Cobol Tabs/Indents in Visual Studio Code

你说的曾经没有我的故事 提交于 2019-12-11 06:35:30
问题 I have just installed Visual Studio Code on my Mac. What is driving me crazy is my inability to set my tabs/indents to match my preferred Cobol formatting of columns 7, 8, 12, 16, 20, 24 and 72. I have seen how to set the tab to 4 spaces, but that gives me Indents to column 5, 9 etc as it seems to tab column 1 + 4 which of course is 5 and then tab 4 spaces from there. 回答1: I'd guess the options are: an extension that explicit does this already (you didn't specified if you use any COBOL

architectures of COBOL and Java

倾然丶 夕夏残阳落幕 提交于 2019-12-11 05:27:28
问题 Can anyone tell me the differnces in styles and architectures between these very differenct approaches please? 回答1: These are totally different languages intended for different purposes. COBOL is early days language for financial/accounting purposes very strict about program flow. Java is something totally different which is an evolved OOPL for general purpose applicaation development. I dont see any point in comparing COBOL and Java. let me know what exactly you were looking for and to help

COM interop: Variable number of parameters

Deadly 提交于 2019-12-11 03:34:10
问题 I am developing an C# libraries, that I need to call from COBOL (unmanaged) code. So I am using COM interop for these purposes. I have created an layer "ModuleLanucher" that mediates the communication. I have registered this ModuleLanucher library by these commands: regasm ModuleLanucher.dll /codebase TLBEXP Modulelanucher.dll Everything works fine if I have concrete number of parameters in function foo. (mentioned below) Unfortunately my function foo needs variable number of arguments. This

Getting a driver for VMS to connect to SQL Server 2005

我与影子孤独终老i 提交于 2019-12-11 03:28:13
问题 I want to connect from a COBOL/VMS system to an SQL Server 2005 instance. Could someone point me to a driver that works well? 回答1: This is similar to another question on SO. Though not specific to VMS, many of the options presented there would work with VMS/ODBC. You may also want to look at FreeTDS (I've used it many times but never from VMS) if you are looking for an open source implementation you can customize. Otherwise, the supported/commercial vendors that have products that would work

Cobol - Importing a signed numeric with real decimal

江枫思渺然 提交于 2019-12-11 02:53:07
问题 I'm having trouble getting my batch to correctly interpret the values in a file I'm reading. The values have a separate leading sign and a real decimal, eg: ;+000000123.99;+123456789.99; But the following just gives me compilation errors: 10 FILLER PIC X(1). 10 VALUE1 PIC S9(9),9(2) SIGN LEADING SEPARATE. 10 FILLER PIC X(1). 10 VALUE2 PIC S9(9),9(2) SIGN LEADING SEPARATE. 10 FILLER PIC X(1). In this shop, they use DECIMAL POINT IS COMMA I thought I'd be able to just define a numerical as

Is there an existing gem or script that converts numbers to comp-3/packed decimal format?

巧了我就是萌 提交于 2019-12-11 02:46:14
问题 Continuing with my adventure to convert COBOL to a Ruby program, I have to convert a decimal digit to a comp-3/packed decimal format. Anyone know of a simple Ruby script or gem that does this? Berns 回答1: Ruby knows how to pack nibbles, so it turns out to be quite easy: def pack_comp(n) s = n.abs.to_s + (n < 0 ? "d" : "c") s = "0" + s if s.size.odd? [s].pack("H*") end 来源: https://stackoverflow.com/questions/2623997/is-there-an-existing-gem-or-script-that-converts-numbers-to-comp-3-packed

TSO/MVS Uploading problem

℡╲_俬逩灬. 提交于 2019-12-11 02:07:00
问题 I'm uploading an ebcdic file(converted from ascii) from Windows OS to Mainframe. My problem is that when I checked the file after uploading it, I see alot of new lines. When I tried to check it with its hex dump I discovered that when mainframe sees a x'15' it translates it into a newline. In the file there are packed decimals so the hex could contain let say a x'001500001c' but when I upload it, mainframe mistook it as a new line. Can anyone help me with this problem? 回答1: You should put

COBOL read/store in table

▼魔方 西西 提交于 2019-12-11 01:29:23
问题 The goal of this exercise is to read and store an input file into a table then validate certain fields within the input and output any error records. I need to read and store each policy group so that there are just 5 records stored in the table at a time instead of the entire file. So I need to read in a policy group which is 5 records, do the processing, then read the next 5 records, etc until the end of the file.. This is the input file. 10A 011111 2005062520060625 20A 011111000861038 32A

How to remove DFSORT messages from SYSOUT

馋奶兔 提交于 2019-12-10 21:15:15
问题 There are several messages from DFSORT, which is internally used by the COBOL program that has several sort operations. I would like to remove those DFSORT messages and retain only those from the COBOL program. 回答1: You have three options. Use the OUTDD(ddname) Enterprise COBOL compiler option to change the DDName used for DISPLAY output. Use the DFSPARM as you have discovered, to change the DDName SORT uses for its messages when it is invoked (called) from a program (as when using the SORT

Japanese COBOL code on IBM mainframe in Shift-JIS; represented after transfer to a PC how?

笑着哭i 提交于 2019-12-10 17:22:54
问题 We have a Japanese client that has source code in COBOL on an mainframe. He claims the code on the mainframe is represented in Shift-JIS2 (and we think we understand that pretty well). When that code is transferred to an PC, what is the most common encoding used? We've sent him a program to process that COBOL code and it seems to choke. The customer won't give us the code directly, so experiments are hard. His experiments seem to indicate UTF-8; I assume the Japanese characters encodable in