View previous topic :: View next topic
|
Author |
Message |
apandey1
New User
Joined: 29 Sep 2008 Posts: 2 Location: Mumbai
|
|
|
|
Hi
I have declared a variable block file into my prog.
FD UNIA-AGENT-IP-FILE
RECORDING MODE IS V
BLOCK CONTAINS 0 RECORDS
RECORD IS VARYING FROM 1 TO 990
DEPENDING ON WS-COUNT-REC.
01 UNIA-AGENT-IP-REC PIC X(990).
Largest record length of my input file is 994, so in FD iI gave 990 bytes, now while opening this input file, I am getting below file status code in sysout
ENTERING MODULE
UIXXU00 - MSG0101 OPEN ERROR ON AGENTINP INPUT FILE - FILE STATUS CODE = 9) |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Are you sure you're running on a mainframe? Enterprise COBOL file status codes are 2 digits, so if you are running on a mainframe you are missing the VITAL second digit of the file status code. |
|
Back to top |
|
|
apandey1
New User
Joined: 29 Sep 2008 Posts: 2 Location: Mumbai
|
|
|
|
running the program in MFED(microfocus enterprise developer),
but compiler directives are set to Z/OS, microsoft enterprise cobol.
not to MF Cobol. |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
Quote: |
Largest record length of my input file is 994, so in FD iI gave 990 bytes, now while opening this input file, I am getting below file status code in sysout. |
What do you mean? The LRECL(in JCL) of your VB dataset is 994 or the maximum record length of any record in the VB dataset could be 994? In later case your VB dataset LRECL(in JCL) will be 998 and in COBOL program you should use 994. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
running the program in MFED(microfocus enterprise developer),
but compiler directives are set to Z/OS, microsoft enterprise cobol.
not to MF Cobol. |
In that case, look up the file status code in the MFED manual. There is nothing we can do to help you when you come to us with non-mainframe products. And an Enterprise COBOL file status code would be 90 through 99, NOT "9". The fact that you're getting non-Enterprise COBOL file status codes out means that even though compiler directives are set to z/OS means that the compiler does NOT replicate the mainframe environment. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Also, you should be able to check your compiler output to see what the file is listed as -- depending upon how you code your program, it is not uncommon for COBOL to consider a variable length file to be fixed length, which would cause a non-zero file status code when you open the file (most likely a 39 but if the data set is VSAM it could be 92).
Code: |
Source Hierarchy and Base Displacement Asmblr Data Data Def
LineID Data Name Locator Structure Definition Data Type Attributes
2 PROGRAM-ID MF0022------------------------------------------------------------------------------------------------------*
31 FD VSAM-FILE . . . . . . . . . . . . . . . . . . BLF=00001 VSAM F
32 1 VSAM-RECORD . . . . . . . . . . . . . . . . . BLF=00001 DS 0CL1000 Group |
This Enterprise COBOL output extract shows a fixed length VSAM data set. For a variable length VSAM data set, the F under Data Def Attributes would be a V. |
|
Back to top |
|
|
|