Copying a VB record when certain conditions are met
Moderators: DikDude, Moderator Group
-
- Member
- Posts: 10
- Joined: Fri May 25, 2012 4:52 pm
Changed lrecl and removed blksize in code:
FILE FILEA
FA-ARG 01 06 N
FILE FILEB VB 1035
IN-REC 01 1035 A
REC-TYP 71 1 A
FB-ARG 325 06 N
FILE MTCHOUT VB 1035
OUT-REC 01 1035 A
JOB INPUT (FILEA KEY(FA-ARG) +
FILEB KEY(FB-ARG))
IF MATCHED AND REC-TYP = 'L'
OUT-REC = IN-REC
PUT MTCHOUT
END-IF
Received abend messages:
3 FILE FILEB VB 1035
3 *******B026 REQUIRED PARAMETER IS NOT CODED
4 IN-REC 01 1035 A
5 REC-TYP 71 1 A
6 FB-ARG 325 06 N
7 FILE MTCHOUT VB 1035
7 *******B026 REQUIRED PARAMETER IS NOT CODED
8 OUT-REC 01 1035 A
9 JOB INPUT (FILEA KEY(FA-ARG) +
FILE FILEA
FA-ARG 01 06 N
FILE FILEB VB 1035
IN-REC 01 1035 A
REC-TYP 71 1 A
FB-ARG 325 06 N
FILE MTCHOUT VB 1035
OUT-REC 01 1035 A
JOB INPUT (FILEA KEY(FA-ARG) +
FILEB KEY(FB-ARG))
IF MATCHED AND REC-TYP = 'L'
OUT-REC = IN-REC
PUT MTCHOUT
END-IF
Received abend messages:
3 FILE FILEB VB 1035
3 *******B026 REQUIRED PARAMETER IS NOT CODED
4 IN-REC 01 1035 A
5 REC-TYP 71 1 A
6 FB-ARG 325 06 N
7 FILE MTCHOUT VB 1035
7 *******B026 REQUIRED PARAMETER IS NOT CODED
8 OUT-REC 01 1035 A
9 JOB INPUT (FILEA KEY(FA-ARG) +
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
// DCB=(SYS2.DSCB,RECFM=VB,LRECL=1039,BLKSIZE=27998)
FILE FILEB VB (1035 1039)
don't know anything about ezytrieve,
but, the lrecl in the dcb should include VLI (RDW) yes?no?
but normally, the vli(rdw) is not included in the file description size. yes/no???
but when you define only 1 size for the file length,
then it is no longer VB
FILE FILEB VB 1035 <<<<<<<<<<<<missing arg....
FILE FILEB VB (1035 1039)
don't know anything about ezytrieve,
but, the lrecl in the dcb should include VLI (RDW) yes?no?
but normally, the vli(rdw) is not included in the file description size. yes/no???
but when you define only 1 size for the file length,
then it is no longer VB
FILE FILEB VB 1035 <<<<<<<<<<<<missing arg....
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
-
- Member
- Posts: 10
- Joined: Fri May 25, 2012 4:52 pm
Please go to 3.4 and look at the file information for both files and post the result here (if they are not the same). If they are the same, just show one.
Also, suggest you take the blksize out of the SPACE parameter. And while editing, try without the SYS2.DSCB. It shouldn't hurt, but none of my clients has used model dscbs for a long time.
If i can, i'll try to test this sometime this evening (no guarantee).
Also, suggest you take the blksize out of the SPACE parameter. And while editing, try without the SYS2.DSCB. It shouldn't hurt, but none of my clients has used model dscbs for a long time.
If i can, i'll try to test this sometime this evening (no guarantee).
Have a good one
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Your records in the JCL you show are 1039. Your records in your program are 1035. Difference is four bytes.
For the FILE you should be able to code VB ( 1039 0 ) and Easytrieve will handle (in co-operation with SMS, or the JCL) obtaining the blocksize at run-time.
I see you now changed the records on the file to max of 1035, so your four bytes won't fit any more anyway.
What is the LRECL of the file containing the data you want to copy? Have the same LRECL for your output.
Put that on the FILE statements of the Easytrieve program. Put zero for the blocksizes. Enclose the two in brackets/parenthesis.
PUT A FROM B
or
MOVE A TO B
PUT B
Get rid of the assignment statement. When you get records shorter than the maximum, you are putting rubbish into your output, and at some point you'll get an S0C4 as you attempt to access data beyond the final short record in the last input buffer.
For the FILE you should be able to code VB ( 1039 0 ) and Easytrieve will handle (in co-operation with SMS, or the JCL) obtaining the blocksize at run-time.
I see you now changed the records on the file to max of 1035, so your four bytes won't fit any more anyway.
What is the LRECL of the file containing the data you want to copy? Have the same LRECL for your output.
Put that on the FILE statements of the Easytrieve program. Put zero for the blocksizes. Enclose the two in brackets/parenthesis.
PUT A FROM B
or
MOVE A TO B
PUT B
Get rid of the assignment statement. When you get records shorter than the maximum, you are putting rubbish into your output, and at some point you'll get an S0C4 as you attempt to access data beyond the final short record in the last input buffer.
-
- Member
- Posts: 10
- Joined: Fri May 25, 2012 4:52 pm
Success !!! In the code, changing to VB ( 1039 0 ) and getting rid of the assignment statement was the solution. No JCL changes were needed. Here is the code:
FILE FILEA
FA-ARG 01 06 N
FILE FILEB VB (1039 0)
REC-TYP 71 1 A
FB-ARG 325 06 N
FILE MTCHOUT VB (1039 0)
JOB INPUT (FILEA KEY(FA-ARG) +
FILEB KEY(FB-ARG))
IF MATCHED AND REC-TYP = 'L'
PUT MTCHOUT FROM FILEB
END-IF
THANKS !!!!
FILE FILEA
FA-ARG 01 06 N
FILE FILEB VB (1039 0)
REC-TYP 71 1 A
FB-ARG 325 06 N
FILE MTCHOUT VB (1039 0)
JOB INPUT (FILEA KEY(FA-ARG) +
FILEB KEY(FB-ARG))
IF MATCHED AND REC-TYP = 'L'
PUT MTCHOUT FROM FILEB
END-IF
THANKS !!!!
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page