Cobol File Status 41 & 42

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Cobol File Status 41 & 42
# 1  
Old 10-11-2007
Cobol File Status 41 & 42

I'm new to coding on Unix but have coded with COBOL on mainframe for a number of years. This is driving me nuts. My select clause is like so:
my WS declaration:

I can open the file with file status "00" and write to it with file status "00" until I have written 1024 records - at which point I get a file status 23 ?? (which used to mean to me that record key not found).
When looking at the physical file I see that nothing has been written so I coded a close when I wrote 1023 records:
IF CNTR = 1023
I got a status 42 - file already closed. I know for sure its already open but I inserted the following OPEN line giving:
IF CNTR = 1023

Now I get a status 41! Its already opened and its already closed! I tried to "touch" the file so that it was already generated before the original open statement - still opens with a "00" but still gives the same end result. I believe this all has something to do with logical vs physical files but dont know where to take it. Anyone??
# 2  
Old 10-11-2007
It would be helpful to provide

(a) the operating system you are using and
(b) the version of COBOL.


UNIX filesystems are normally case sensitive, does this match the file system?
# 3  
Old 10-12-2007
yes - the file name and location is correct including caps, the host system is
HP Itanium B.11.23
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to see the status of all the ftp put & get files logs and curent ftp transfer status ?

How to see the status of all the ftp put & get files logs and curent ftp transfer status if any active ftp running in the background ? (2 Replies)
Discussion started by: i4ismail
2 Replies

2. Shell Programming and Scripting

File Move & Sort by Name - Kick out Bad File Names & More

I have a dilemma, we have users who are copying files to "directory 1." These images have file names which include the year it was taken. I need to put together a script to do the following: Examine the file naming convention, ensuring it's the proper format (e.g. test-1983_filename-123.tif)... (8 Replies)
Discussion started by: Nvizn
8 Replies

3. Red Hat

How to kill a TCP connection which has status TIME_WAIT & no PID

Hi, I want to kill TCP connections which have status as TIME_WAIT & no PID (as per the output of the "netstat - p" command). Is there any command/utility available to kill connections to a specific port or IP address. The problem is that these connections don't have process ID (see... (4 Replies)
Discussion started by: Davinder31may
4 Replies

4. Programming

Apache & nfs status from c++ application

Hello guys, I have just started building a high-available site using ubuntu server 9.10. I am using moodle. The thing is that i want to write an application using curses, to show the status of the apache servers, mysql servers and the nfs server. I can check the mysql from the c api, but how can... (1 Reply)
Discussion started by: pegasus001
1 Replies

5. Shell Programming and Scripting

Calling script from RM cobol and returning value to cobol

Is there a way you can return a value from a script that is called from a rm cobol program... 01 WS-COMD-LINE-PGM X(39) value sh ./ 12345" 01 WS-RETURN-SYS-CODE PIC 9(8). CALL "SYSTEM" USING WS-COMD-LINE-PGM GIVING WS-RETURN-SYS-CODE. ... (1 Reply)
Discussion started by: pavanmp
1 Replies

6. Programming

cobol crn programme run on express cobol as .gnt

can i run .crn programme in express cobol which support to .gnt programme .... Plz tell me solution (2 Replies)
Discussion started by: bibi
2 Replies

7. HP-UX

Error in a cobol executable file

Hi, when i try to run an executable on a HP UX machine i get the following error /usr/lib/..../ Unsatisfied code symbol '_tMca100b' in load module .... The exe is a cobol program. can somebody tell why? Thanks. (2 Replies)
Discussion started by: vovan
2 Replies

8. UNIX for Dummies Questions & Answers

COBOL file status 39

When I execute a COBOL load module, I get the following error: $ a.out IWZ200S Error detected during OPEN for file 'ABE-INPUT'. File status is: 39. Message routine called from offset 0x38 of routine iwzWriteERRmsg. iwzWriteERRmsg called from offset 0x3c4 of routine... (3 Replies)
Discussion started by: jbrubaker
3 Replies

9. UNIX for Dummies Questions & Answers

BOX Status with vmstat & top Solaris 2.8

Hi there, Im trying to get the information of vmstat & top in two different logfiles. That not that difficult. vmstat 30 >> myfile.log top >> myfile2.log But I also like to include a timestamp every 30 sec to be sure from what date the logs are. For the Top command I were able to... (2 Replies)
Discussion started by: isacs
2 Replies

10. UNIX for Dummies Questions & Answers

Couldn't open status file /var/samba/STATUS.LCK

I believe i have most of samba configured right but i get this error each time time try to run it. I was given suggestion that i touch the file, i did, but i still cannot rid myself of this error. Any suggestions (2 Replies)
Discussion started by: macdonto
2 Replies
Login or Register to Ask a Question