Robert Sample wrote:I'm fairly confused at this point. Your problem statements reference an input VB file and an input FB file, yet none of the code you have shown references an FB input file. What does the DD statement for your output VB file look like? File status 34, in my experience, happens most frequently when the DD statement parameters do not match the COBOL program parameters. It is also possible that your issue is that you are writing fixed-length records (FS-OVB-REC) into your VB data set. What does the compile XREF have for the attributes of your output VB file?
The art (and it is definitely an art) of debugging is difficult for many programmers to grasp as they are trying to find errors in their code. Questions you should ask yourself include (but certainly are not limited to):
- When does the file status 34 occur -- on first write? after first write?
- If after first write, what is different about that record where the first write succeeded?
- How many bytes is the program trying to write for the record having the issue?
- What are the values for WS-INVB-REC-LENGTH and WS-OVB-REC-LENGTH for that record?
- What does FS-OVB-REC look like for that record?
Hi Robert,
Thanks a lot for the reply. Yes I have not shared the code of FB dataset.
Reply of the question asked by you :
- When does the file status 34 occur -- on first write? after first write? ---->
at record number 1446521 (out of more than 2 million records)- If after first write, what is different about that record where the first write succeeded? ----->
I don't see any difference other than record length and off course the value of in it
- How many bytes is the program trying to write for the record having the issue? ----->
285 - What are the values for WS-INVB-REC-LENGTH and WS-OVB-REC-LENGTH for that record? ---->
WS-INVB-REC-LENGTH = 214 and WS-OVB-REC-LENGTH = 285- What does FS-OVB-REC look like for that record?[/quote] -
did not understand this questionJCL : -
//BKSJOB JOB (' SALESFORCE '),NOTIFY=BKS,
// CLASS=B,REGION=4M
//*
//*--------------------------------------------------------------
//* CREATING A SALESFORCE FILE
//*--------------------------------------------------------------
//*
//STEP01 EXEC PGM=EXP04
//STEPLIB DD DSN=LMPAF6.TEST.LOAD,DISP=SHR
//SYSDBOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//INVBSFIL DD DSN=LMPAF5.INVBFILE.SORT,DISP=SHR
//*INFBOFIL DD DSN=LMPAF5.INFBFILE.SORT,DISP=SHR
//OVBFIL DD DSN=LMPAF6.SFADD.FILE2,
// UNIT=SYSDA,VOL=SER=LMSUSA,
// DISP=(NEW,CATLG,CATLG),SPACE=(CYL,(50,50),RLSE),
// DCB=(DSORG=PS,RECFM=VB,LRECL=6175,BLKSIZE=0)