View previous topic :: View next topic
|
Author |
Message |
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
Start statement successfully executed,but while Read Vasam file iam getting file status= 04.
START TPU-INPUT-FILE KEY IS >= RTI-VSAM-KEY
READ TPU-INPUT-FILE NEXT RECORD.
Vsam key is below,
05 RTI-VSAM-KEY.
10 RTI-ACCOUNT-NUM.
15 ACCNUM PIC X(10) VALUE SPACES.
15 FILLER PIC X(24) VALUE SPACES.
10 RTI-AMOUNT PIC 9(12)V9(2) COMP-3 VALUE ZEROS.
10 RTI-HLD-SQN PIC 9(05) VALUE ZEROS.
10 ITEM-COUNTER PIC 9(05) VALUE ZEROS.
INITIALIZE RTI-VSAM-KEY.
MOVE DEPOSIT-ACCT-FULL TO ACCNUM.
MOVE WS-RTI-TRAN-AMOUNT TO RTI-AMOUNT.
START TPU-INPUT-FILE KEY IS >= RTI-VSAM-KEY
READ TPU-INPUT-FILE NEXT RECORD.
Please sugget me how to solve this? |
|
Back to top |
|
|
icetigerfan
New User
Joined: 08 Mar 2010 Posts: 13 Location: Nuremberg, Germany
|
|
|
|
Hi,
you will find this description in the Language Reference:
Quote: |
A READ statement was successfully executed, but the length of the
record being processed did not conform to the fixed file attributes
for that file. |
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Fix your code to have the right record length for the file. |
|
Back to top |
|
|
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
i saw the description in file status manual,but i am expecting why i am getting file status 04 and how can i solve this problem.please tell me is there any change in my code? |
|
Back to top |
|
|
icetigerfan
New User
Joined: 08 Mar 2010 Posts: 13 Location: Nuremberg, Germany
|
|
|
|
The error may be in your JCL (if it's a Batch-Programm) |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
icetigerfan,
the file in question is a VSAM (assume KSDS), which means little or no DCB parms are contained in the JCL for the step.
The TS's (Topic Starter) record descriptions in the FD statement are what Robert is suggesting that should be corrected. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
.please tell me is there any change in my code? |
How on earth would we know this? You wrote the code, presumably, so you should know if it changed?
Do a LISTCAT ENT(???) ALL on your VSAM file. Compare the file definition to your program's data map to see how they compare. If you still cannot find the problem, post the entire LISTCAT output and the VSAM file data map and we'll help identify the problem. |
|
Back to top |
|
|
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
Hi Robert,
i have compared LISTCAT entries and my fiel definition in my program.Both lengths are same,but still i am getting same error.
VSAM program fields in my program below,
Code: |
********************** Top of Data ******************************
01 RTI-5DAY-VSAMFILE.
05 RTI-VSAM-KEY.
10 RTI-ACCOUNT-NUM PIC X(34) VALUE SPACES.
10 RTI-AMOUNT PIC 9(12)V9(2) COMP-3 VALUE ZEROS.
10 RTI-HLD-SQN PIC 9(05) VALUE ZEROS.
10 ITEM-COUNTER PIC 9(05) VALUE ZEROS.
05 RTI-CAPT-DTE PIC 9(08) VALUE ZEROS.
05 RTI-ACTION PIC X(01) VALUE SPACES.
05 RTI-VALUE-DTE PIC 9(08) VALUE ZEROS.
05 RTI-EXPIRE-DTE PIC 9(08) VALUE ZEROS.
05 RTI-HLD-TYPE PIC X(01) VALUE SPACES.
05 RTI-STATUS PIC X(01) VALUE SPACES.
********************* Bottom of Data **************************** |
each fields length details below,
Code: |
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START END LENGTH
RTI-5DAY-VSAMFILE 1 79 79
5 RTI-VSAM-KEY GROUP 1 1 52 52
10 RTI-ACCOUNT-NUM X(34) 2 1 34 34
10 RTI-AMOUNT 9(12)V99 3 35 42 8
10 RTI-HLD-SQN 9(5) 4 43 47 5
10 ITEM-COUNTER 9(5) 5 48 52 5
5 RTI-CAPT-DTE 9(8) 6 53 60 8
5 RTI-ACTION X 7 61 61 1
5 RTI-VALUE-DTE 9(8) 8 62 69 8
5 RTI-EXPIRE-DTE 9(8) 9 70 77 8
5 RTI-HLD-TYPE X 10 78 78 1
5 RTI-STATUS X 11 79 79 1
******************************* Bottom of data ******************************** |
Code: |
LISTCAT ENTRIES(ITA16D.RTI50.VSAM.CLUSTER1) ALL 00070001
CLUSTER ------- ITA16D.RTI50.VSAM.CLUSTER1
IN-CAT --- ICFCTLG.DEVCT3
HISTORY
DATASET-OWNER-----ITE92D CREATION--------2010.134
RELEASE----------------2 EXPIRATION------0000.000
SMSDATA
STORAGECLASS ---SCNOGRSP MANAGEMENTCLASS-MCNORLSE
DATACLASS --------(NULL) LBACKUP ---0000.000.0000
BWO STATUS------00000000 BWO TIMESTAMP---00000 00:00:00.0
BWO---------------(NULL)
RLSDATA
LOG ----------------(NULL) RECOVERY REQUIRED --(NO) FRLOG ---------
VSAM QUIESCED -------(NO) RLS IN USE ---------(NO)
LOGSTREAMID-----------------------------(NULL)
RECOVERY TIMESTAMP LOCAL-----X'0000000000000000'
RECOVERY TIMESTAMP GMT-------X'0000000000000000'
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
DATA-----ITA16D.RTI50.VSAM.CLUSTER1.DATA
INDEX----ITA16D.RTI50.VSAM.CLUSTER1.INDEX
DATA ------- ITA16D.RTI50.VSAM.CLUSTER1.DATA
IN-CAT --- ICFCTLG.DEVCT3
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2010.134
RELEASE----------------2 EXPIRATION------0000.000
ACCOUNT-INFO-----------------------------------(NULL)
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--ITA16D.RTI50.VSAM.CLUSTER1
ATTRIBUTES
KEYLEN----------------52 AVGLRECL--------------79 BUFSPACE-------
RKP--------------------0 MAXLRECL--------------79 EXCPEXIT-------
SHROPTNS(1,3) RECOVERY UNIQUE NOERASE INDEXED N
UNORDERED NOREUSE NONSPANNED
STATISTICS
REC-TOTAL--------------5 SPLITS-CI--------------0 EXCPS----------
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS--------
REC-INSERTED-----------0 FREESPACE-%CI----------0 SYSTEM-TIMESTAM
REC-UPDATED------------0 FREESPACE-%CA----------0 X'C5F9A1F0
REC-RETRIEVED----------3 FREESPC----------4128768
ALLOCATION
SPACE-TYPE------CYLINDER HI-A-RBA---------4147200
SPACE-PRI--------------5 HI-U-RBA----------829440
SPACE-SEC--------------1
VOLUME
VOLSER------------DEV786 PHYREC-SIZE--------18432 HI-A-RBA-------
IDCAMS SYSTEM SERVICES TIME: 09:35:43
DEVTYPE------X'3010200F' PHYRECS/TRK------------3 HI-U-RBA-------
VOLFLAG------------PRIME TRACKS/CA-------------15
EXTENTS:
LOW-CCHH-----X'01600000' LOW-RBA----------------0 TRACKS---------
HIGH-CCHH----X'0164000E' HIGH-RBA---------4147199
INDEX ------ ITA16D.RTI50.VSAM.CLUSTER1.INDEX
IN-CAT --- ICFCTLG.DEVCT3
HISTORY
DATASET-OWNER-----(NULL) CREATION--------2010.134
RELEASE----------------2 EXPIRATION------0000.000
PROTECTION-PSWD-----(NULL) RACF----------------(NO)
ASSOCIATIONS
CLUSTER--ITA16D.RTI50.VSAM.CLUSTER1
ATTRIBUTES
KEYLEN----------------52 AVGLRECL---------------0 BUFSPACE-------
RKP--------------------0 MAXLRECL------------1017 EXCPEXIT-------
SHROPTNS(1,3) RECOVERY UNIQUE NOERASE NOWRITECHK
NOREUSE
STATISTICS
REC-TOTAL--------------1 SPLITS-CI--------------0 EXCPS----------
REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS--------
REC-INSERTED-----------0 FREESPACE-%CI----------0 SYSTEM-TIMESTAM
REC-UPDATED------------0 FREESPACE-%CA----------0 X'C5F9A1F0
REC-RETRIEVED----------0 FREESPC------------66560
ALLOCATION
SPACE-TYPE---------TRACK HI-A-RBA-----------67584
SPACE-PRI--------------2 HI-U-RBA------------1024
SPACE-SEC--------------4
VOLSER------------DEV786 PHYREC-SIZE---------1024 HI-A-RBA-------
DEVTYPE------X'3010200F' PHYRECS/TRK-----------33 HI-U-RBA-------
VOLFLAG------------PRIME TRACKS/CA--------------1
EXTENTS:
LOW-CCHH-----X'00460009' LOW-RBA----------------0 TRACKS---------
HIGH-CCHH----X'0046000A' HIGH-RBA-----------67583
IDCAMS SYSTEM SERVICES TIME: 09:35:43
THE NUMBER OF ENTRIES PROCESSED WAS:
AIX -------------------0
ALIAS -----------------0
CLUSTER ---------------1
DATA ------------------1
GDG -------------------0
INDEX -----------------1
NONVSAM ---------------0
PAGESPACE -------------0
PATH ------------------0
SPACE -----------------0
USERCATALOG -----------0
TAPELIBRARY -----------0
TAPEVOLUME ------------0
TOTAL -----------------3
THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0 |
Code'd
Please help me,how to solve this error? |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
babu_hi wrote: |
Vsam key is below,
05 RTI-VSAM-KEY.
10 RTI-ACCOUNT-NUM.
15 ACCNUM PIC X(10) VALUE SPACES.
15 FILLER PIC X(24) VALUE SPACES.
10 RTI-AMOUNT PIC 9(12)V9(2) COMP-3 VALUE ZEROS.
10 RTI-HLD-SQN PIC 9(05) VALUE ZEROS.
10 ITEM-COUNTER PIC 9(05) VALUE ZEROS. |
babu_hi wrote: |
Code: |
********************** Top of Data ******************************
01 RTI-5DAY-VSAMFILE.
05 RTI-VSAM-KEY.
10 RTI-ACCOUNT-NUM PIC X(34) VALUE SPACES.
10 RTI-AMOUNT PIC 9(12)V9(2) COMP-3 VALUE ZEROS.
10 RTI-HLD-SQN PIC 9(05) VALUE ZEROS.
10 ITEM-COUNTER PIC 9(05) VALUE ZEROS.
05 RTI-CAPT-DTE PIC 9(08) VALUE ZEROS.
05 RTI-ACTION PIC X(01) VALUE SPACES.
05 RTI-VALUE-DTE PIC 9(08) VALUE ZEROS.
05 RTI-EXPIRE-DTE PIC 9(08) VALUE ZEROS.
05 RTI-HLD-TYPE PIC X(01) VALUE SPACES.
05 RTI-STATUS PIC X(01) VALUE SPACES.
********************* Bottom of Data **************************** |
|
There is a slight difference between the 2 definitions you gave us,
so I suspect you are not really showing us what's in your program.
Show us the FILE SECTION just as it is in your program: the FD and the 01 which is after it. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Since the LISTCAT output looks good and matches the program code, you need to dump the file (there's only 5 records in it) using IDCAMS to see what the data records look like. If you could post the DUMP command output, that will help.
You've got other problems (such as the INDEX CISIZE is too small) but let's deal with one thing at a time. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Just in the off-chance, what is your DD statement in the step? |
|
Back to top |
|
|
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
Please find my dump command output,
*0001845969 *
* ........000010000120100501A201*
*0050120100501AA *
000000000869257FF0F0F0F0F1F0F0F0F0F1
*0001845969 *
* ......."000010000120100501A201*
*0050120100501AA *
000000000869257FF0F0F0F0F2F0F0F0F0F2
*0001845969 *
* ......."000020000220100501A201*
*0050120100501AA *
000000000069257FF0F0F0F0F1F0F0F0F0F1
*0202741958 *
* ......."000010000120100501A201*
*0050120100501AA *
000000000009257FF0F0F0F0F1F0F0F0F0F1
*0751021105 *
* ......."000010000120100501A201*
*0050120100501AA *
and dd statement in my jcl is for this VSAM input file is
//RTI5DA3I DD DSN=ITA16D.RTI50.VSAM.CLUSTER1,DISP=SHR |
|
Back to top |
|
|
icemanroh
New User
Joined: 23 Aug 2008 Posts: 25 Location: Mumbai
|
|
|
|
I hope you are not getting any error code when you are opening this file. Just try below & let me know if it works for you.
Add another 01 level in your FD section & keep its length equal to avg length of the VSAM file. |
|
Back to top |
|
|
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
Problem got solved and it working fine now....Thanks for all replies. |
|
Back to top |
|
|
icemanroh
New User
Joined: 23 Aug 2008 Posts: 25 Location: Mumbai
|
|
|
|
Did you try to recompile a COBOL VS II components with E-Cobol?
In that case, at the very begining you would've got the error code 39. Then you would've fixed the length but when reading a record you got 04. This happens because E cobol is different for older cobol versions.
OPEN statement failing for VSAM files (file status 39)
In OS/VS COBOL, the RECORDSIZE defined in your VSAM files associated with IDCAMS was not required to match your COBOL program for a successful OPEN. In Enterprise COBOL they must match. The following rules apply to VSAM ESDS, KSDS, and RRDS file definitions:
ESDS and KSDS VSAM
Rule: RECORDSIZE(avg,m) is specified where avg is the average size of the COBOL records, and is strictly less than m; m is greater than or equal to the maximum size of a COBOL record.
RRDS VSAM
Rule: RECORDSIZE(n,n) is specified where n is greater than or equal to the maximum size of a COBOL record. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
babu_hi wrote: |
Problem got solved and it working fine now....Thanks for all replies. |
glad that it is solved. would be helpful to others if you could explain the resolution. |
|
Back to top |
|
|
icemanroh
New User
Joined: 23 Aug 2008 Posts: 25 Location: Mumbai
|
|
|
|
I am assuming that the problem was a result of Ecobol recompilation. As I posted earlier that the file length has to be matched in Cobol program.
This only resolves the open error. But when you try to read the file it produces 04. Why? because even though the VSAM file is variable the ecobol program still treats it as a FB file. So the simplest way you make the program understand that it is not a FB file but a VB file is to declare another 01 level.
Hope this helps. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
babu_hi wrote: |
Problem got solved and it working fine now....Thanks for all replies. |
What was wrong ?
It's not just out of curiosity: if the problem was somewhere else we didn't mention, we too can learn something new. |
|
Back to top |
|
|
babu_hi
New User
Joined: 11 Apr 2006 Posts: 93
|
|
|
|
I have mentioned another 01 level in my program as suggested by Rohit and recompiled again then problem got resolved.
Thanks
Bab |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
babu_hi,
the other 01 level in your program that you added.
What is the length of this new record? |
|
Back to top |
|
|
|