cobol

COBOL - Differing answer from mainframe to PC for same COMPUTE

a 夏天 提交于 2019-12-08 15:51:56
问题 I have this very simple dummy COBOL program which does a dummy COMPUTE and displays the result. ID DIVISION. PROGRAM-ID. DUMMYPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 NUM-A PIC 9(3) VALUE 399. 01 NUM-B PIC 9(3) VALUE 211. 01 NUM-C PIC 9(3). * PROCEDURE DIVISION. MAIN. COMPUTE NUM-C = ((NUM-A / 100) - (NUM-B / 100)) * 100 DISPLAY 'NUM-C IS ' NUM-C STOP RUN. When I compile this code on a mainframe (with compiler MVS Enterprise COBOL V4.2) and execute it, I get "NUM-C IS 100", probably

What can cause CICS transaction to write out of CICS allocated memory?

梦想的初衷 提交于 2019-12-08 13:34:41
问题 I'm using CICS in Cobol program and I've noticed that sometimes data are written out of the CICS memory. It cause a data corruption and my application stop. I don't know where it append, so I'm creating a parser to analyse my Cobol code to look for possible corruption in COMMAREA used by CICS. Now I checked following statements : EXEC CICS XCTL EXEC CICS LINK EXEC CICS RETURN TRANSID For each, I check if sent length (declared in LENGTH parameter) is not greater than sent COMMAREA . Then I

How to insert records in a table in a text file using COBOL and search and display record(s) which satisfy a condition?

北城以北 提交于 2019-12-08 09:12:21
问题 I am trying to write a COBOL program to read an input file "INPUT.TXT" and display the details of students whose RATING='B'.I am using [ http://www.compileonline.com/compile_cobol_online.php ] for my program. The records in "INPUT.TXT" (please note that the input file is a simple text file) are: EMPID NAME COMPANY RATING 112211 UMESH CAPGEMINI A 221122 ISHAN ZALONI A 134231 AJMERA GOOGLE B 232144 NIYANTA WIPRO B 561144 KANKANA ZETA A 324556 CHRISTOPHER TCS C 123443 SIDDIKA TCS A So far, I

COBOL program, JCL job, or both?

自闭症网瘾萝莉.ら 提交于 2019-12-08 06:37:50
问题 I have to preform 3 tasks: an insert, a delete, and a write I'm not sure what the best way to do this is. My mainframe program design skills aren't too tight, so I was looking for advice. Could I avoid doing a COBOL program for this? The way I see it, I just need JCL that executes SQL statements. If I design my statements correctly, then they should be able to preform tasks 1 and 2 this way. But I'm thinking I may need to have a COBOL program to write to a file? I'll overview my thought

Bad syntax with my loop, but not throwing an error in COBOL

∥☆過路亽.° 提交于 2019-12-08 03:47:33
问题 I guess i messed the switch up when i was messing with it trying to figure out why it woulden't work. It only reads the first line of my data, then ends. ( it prints headers, first line of data, all the calculations that are in 300-process-records, and does the final heading for ending the report. FILE-CONTROL. SELECT F01-INPUT-FILE ASSIGN TO 'I:\COBOL\EmployeePay.dat' ORGANIZATION IS LINE SEQUENTIAL. SELECT F02-PRINT-FILE ASSIGN TO 'I:\COBOL\EmployeePay.out' ORGANIZATION IS LINE SEQUENTIAL.

COBOL level 88 data type

蹲街弑〆低调 提交于 2019-12-08 02:45:33
问题 Very basic question here. I have to write out a data glossary for a COBOL program. This data glossary includes the following details about every variable: Name Data type Range of values (if applicable) Line numbers Fuller name I have several variables that include level 88 switches. My question is this: Are these level 88 switches counted as variables, and should I include them in the data glossary? Or, judging by the data glossary structure I have to work with, should they be ignored in this

Bad syntax with my loop, but not throwing an error in COBOL

為{幸葍}努か 提交于 2019-12-07 16:58:26
I guess i messed the switch up when i was messing with it trying to figure out why it woulden't work. It only reads the first line of my data, then ends. ( it prints headers, first line of data, all the calculations that are in 300-process-records, and does the final heading for ending the report. FILE-CONTROL. SELECT F01-INPUT-FILE ASSIGN TO 'I:\COBOL\EmployeePay.dat' ORGANIZATION IS LINE SEQUENTIAL. SELECT F02-PRINT-FILE ASSIGN TO 'I:\COBOL\EmployeePay.out' ORGANIZATION IS LINE SEQUENTIAL. DATA DIVISION. FILE SECTION. FD F01-INPUT-FILE RECORD CONTAINS 30 CHARACTERS DATA RECORD IS F01-INPUT

Is there a free (as in beer) Flow chart generator for COBOL Code? [closed]

别说谁变了你拦得住时间么 提交于 2019-12-07 15:26:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I've never read COBOL in my life and have been tasked with rewriting the old COBOL code in a new language. Are there any free or free-to-try software packages out there that will generate a flow chart for a COBOL program? I've looked at "Visustin" and "Code Visual to Flowchart" Visustin blanks out part of the

Porting from Cobol to Java [closed]

醉酒当歌 提交于 2019-12-07 04:37:57
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . What differences are there between the top level architectures of Cobol and Java? What are the styles and cultures that programmers adopt in these two languages? How can one best port from Cobol to Java? 回答1: I was the project leader for the project NACA mentionned above

how to format a number to S9(5)V99 ascii in .net

Deadly 提交于 2019-12-07 04:26:10
问题 I've been searching for s9(5)v99 but got different information and not really clear. Could someone shows how or the formula to convert. thanks 回答1: What you have shown us here is the PICTURE clause portion of a COBOL data declaration. COBOL data declarations are a bit odd and take some getting used to. Here is a link to an introductory tutorial on COBOL data declarations. This should get you started. The PICture clause you have given in your question is defining a numeric item with the