Page 2 of 2

Posted: Tue May 29, 2012 10:59 pm
by Sturminator
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) +

Posted: Tue May 29, 2012 11:14 pm
by dbzTHEdinosauer
// 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....

Posted: Tue May 29, 2012 11:17 pm
by DikDude
My intent was to change the JCL, not the program. . .

Please try again.

The earlier post has been edited for clarification.

Posted: Tue May 29, 2012 11:41 pm
by Sturminator
Changed JCL to lrecl 1035 and removed blksize on the output file MTCHOUT:

// DCB=(SYS2.DSCB,RECFM=VB,LRECL=1035)


Results are the same as above where the last 4 bytes of the records are gone.

Posted: Wed May 30, 2012 1:41 am
by DikDude
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).

Posted: Wed May 30, 2012 2:21 am
by William Collins
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.

Posted: Wed May 30, 2012 5:21 pm
by Sturminator
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 !!!!

Posted: Thu May 31, 2012 12:03 am
by DikDude
Good to hear it is working - thank you for letting us know :)

d

Topic deleted by Admin

Posted: Tue Jan 19, 2016 8:16 pm
by academyindia4
<< Content deleted By Admin >>