cobol

DB2/Cursor program working in cobol

一个人想着一个人 提交于 2019-12-13 04:33:33
问题 My requirement is to delete data from db2 table which contains duplicate phone num(invalid phone num, set of 16 phone numbers which is hardcoded).And one phone num should be retained , that depends on sequence number(minimum value). consider main table has following data : PHONE_TAB Client_Id Phone_num Seq_num 1234 45678 15 --- delete 4444 55555 45 1234 45678 10 ---should be retained 5555 22222 25 1234 45678 20 --- delete 1234 45678 11 --- delete Note : also i have to move the rows which will

How to add a string of asterisks in Cobol? [closed]

青春壹個敷衍的年華 提交于 2019-12-13 03:43:05
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . Problem: If the inventory total is less than 50, add a string of two asterisks (**) at the end of the written row to notify the inventory manager that more inventory is needed. If the inventory total is less than 10, add a string of five asterisks (*****) at the end of the row to

convert cobol COMP data to ASCII

耗尽温柔 提交于 2019-12-13 03:36:02
问题 I'm converting some COBOL dat file to ASCII using utility vutil: vutil -extract input.dat > output.txt I can't get a human readable response from COMP data fields. Here's is part of my FD file 05 FAT-TIPOFT PIC 9(4). 05 FAT-DINI PIC 9(8). 05 FAT-DFIN PIC 9(8). 05 FAT-IMPON PIC S9(7)V99 COMP. 05 FAT-INPS PIC 99. 05 FAT-IMPINPS PIC S9(7)V99 COMP. 05 FAT-IVA PIC 99. And here an ASCII convertion example: 0107200230062003 ‚p00 20 ³° 6 00 6 The convertion is fine only for the NON-COMP fields Is

Does a prefix of “NO” have any special meaning in a COBOL variable?

天大地大妈咪最大 提交于 2019-12-13 02:05:38
问题 I am looking at a piece of COBOL code which contains the following line: SET NO-FURTHER-PROCESSING-REQD TO TRUE It also contains the following lines: IF FURTHER-PROCESSING-REQD ... END-IF. Is there some magic going on whereby the variable without the "NO-" prefix is automatically set to the opposite of the variable with the prefix? Or is this more likely to be an oversight by the programmer? 回答1: No. If you look in the DATA DIVISION you'll find two 88-levels beneath the same data-item. 01 A

Is there a way to write comments in modern Cobol? [duplicate]

两盒软妹~` 提交于 2019-12-13 00:34:44
问题 This question already has answers here : Is it possible to add inline comments in Cobol (4 answers) Closed 4 years ago . I'm trying too see how I could add comments to my COBOL program. I know the modern version of COBOL has a way where comments can be written but I am unsure on how to do this. 回答1: *> for inline to-end-of-line comments, fixed and free form (in fixed form the *> will have to be in column 7 or greater). * in column seven for fixed form COBOL * in column one, extension for free

COBOL DB2 program

只愿长相守 提交于 2019-12-12 14:52:18
问题 If I have 1 COBOL DB2 program which is calling 2 other COBOL DB2 sub programs, then how many DBRMs,Packages,Plans it will create? If I am changing any one of the sub program then do I need to recompile and bind all the programs?I am really confused with DBRMs,Plans and Packages. Regards, Manasi 回答1: Oh my... This is a huge topic so this answer is going to be very simplified and therefore incomplete. The answer depends somewhat on whether you are using the DB/2 pre-compiler or co-compiler. For

Abend Causing Line

余生长醉 提交于 2019-12-12 10:01:37
问题 Is there any way that we can find the exact line number that causes an abend ( like SO4C) from the Offset(like offset +00007D0A at address 1515CD0A ) given in the spool with the error message.? 回答1: If your program is compiled with options OFFSET,NOLIST, you will have a list of verbs/line numbers in the output listing which contain the "offset" from the start of the program. The line number on the the listing which has the closest offset, but less than or equal to, the "offset" reported in

Setting up COBOL Compiler under Mac OS?

旧街凉风 提交于 2019-12-12 08:03:06
问题 This question was migrated from Academia Stack Exchange because it can be answered on Stack Overflow. Migrated 6 years ago . In my university, we're being taught COBOL, and I'm trying to get a head start and learn COBOL, C++, and Java before I get into the classes next year. Problem is; COBOL is so old, it's hard to grab support for it in mac (my laptop is a mac). I understand it runs fine on Mac, but finding someone who can explain how to set up the compiler is another story. 回答1: You can

Mainframe COBOL db2 delete program

喜夏-厌秋 提交于 2019-12-12 06:58:02
问题 Detail question is my next question -- please check below link DB2/Cursor program working in cobol 回答1: This should be a 2 step process. First identify the records that are to be deleted and then delete those records in the 2nd step. I think, you'll Not be able to delete the records from the same table you are fetching, that's why 2 steps. Step 1: Select Concat(A.ClientId, A.PhoneNumber, A.Timestamp) from MyTable A Where Concat(A.ClientId, A.PhoneNumber, A.Timestamp) Not IN (Select Concat(B

reading and sorting a variable length CSV file

五迷三道 提交于 2019-12-12 04:14:46
问题 We am using OpenVMS system and I believe it is using the Cobol from HP. With a data file of a lot of records ( 500mb or more ) which variable length . The records are comma delimited. I would like to parse each records and extract corresponding fields for processing. After that, I might want to sort it by some particular fields. Is it possible with cobol? I've seen sorting with fixed-length records only. 回答1: Variable length is no problem, not sure exactly how this is done in VMS cobol but