Page 1 of 2

Please solve this abend in easytreive

PostPosted: Wed Nov 03, 2010 2:23 pm
by haneef
Hi ALL,

I got abend on this please help me

FILE AMZ6P VS UPDATE
*
AMZ6P-RECORD 1 102 A
*
AMZ6P-ORG 1 3 N
AMZ6P-BIN 4 6 N
*
JOB INPUT NULL
*
AMZ6P-ORG = 000
AMZ6P-BIN = 000000
PUT AMZ6P
*
IF AMZ6P:FILE-STATUS NE 0
DISPLAY '*******FILE ERROR:CUST-----STATUS=' AMZ6P:FILE-STATUS
STOP
END-IF
AMZ6P-ORG = 999
AMZ6P-BIN = 999999
PUT AMZ6P
*
Here the requirement is to i have to move the header and the trailer but it is getting abend

EZABX000 An error has occurred in program ????????.
EZABX001 The following messages provide diagnostic information. Please
contact the person or persons responsible for maintaining this
application. They may want to see this information or they may
want it printed.
###################### Diagnostic Information ######################
EZABX003 The error occurred at 6:30 on 03/11/10.
EZIOE004 Logical I/O error on file AMZ6P.
Error indicator returned by access method.
EZIOE006 VSAM return code is 8 with error code of 12.
EZABX008 The error occurred at program statement number 12.
EZABX020 The program referred to the following files:
File Name Record Address Record Length Status
AMZ6P 00036AA8 102 Open

please kindly helpe me on this

Thanks & Regards,
Haneef

Re: Please solve this abend in easytreive

PostPosted: Wed Nov 03, 2010 5:07 pm
by NicC
If you look up the VSAM return code of 8 and error code of 12 for an OPEN what does it say?

Re: Please solve this abend in easytreive

PostPosted: Wed Nov 03, 2010 6:38 pm
by haneef
Hi NIC,

At last i solve this abend but there is problem in it.
It is writing header and trailer but getting some junk data how to handle this to remove this junk data,please help me

Thanks & Regards,
Haneef

Re: Please solve this abend in easytreive

PostPosted: Wed Nov 03, 2010 11:59 pm
by dick scherrer
Hello,

To get rid of the "junk" in the new records, provide valid values before writing these new records.

Re: Please solve this abend in easytreive

PostPosted: Thu Nov 04, 2010 11:59 am
by haneef
Hi Dick,

Actually my requirement is just to move header and trailer using Easytreive. It is writing both Header and Trailer but with junk data.
Please tell me where i have to modify.

FILE AMZ6P VS UPDATE
*
AMZ6P-RECORD 1 102 A
*
AMZ6P-ORG 1 3 N
AMZ6P-BIN 4 6 N
*
WS-AMZ6P-KEY W 9 A
WS-AMZ6P-ORG WS-AMZ6P-KEY 3 N
WS-AMZ6P-BIN WS-AMZ6P-KEY +3 6 N
*
JOB INPUT NULL
*
AMZ6P-ORG EQ 000
AMZ6P-BIN EQ 000000
PUT AMZ6P
*
AMZ6P-ORG EQ 999
AMZ6P-BIN EQ 999999
PUT AMZ6P
*
STOP
*
WRITE AMZ6P



Thanks & Regards,
Haneef

Re: Please solve this abend in easytreive

PostPosted: Thu Nov 04, 2010 2:31 pm
by NicC
By 'junk data' what do you mean? Please show the data produced.

Re: Please solve this abend in easytreive

PostPosted: Thu Nov 04, 2010 3:19 pm
by haneef
Hi

in file i got junk data like this


000001 IDP1 ¦ a ° 0 Ê ©
000002 IDPO 8 0 IDPX
000003
000004
000005 ¦
000006 ¦ 000000000 ¦ 999999999
000007
000008

Regards
Haneef

Re: Please solve this abend in easytreive

PostPosted: Thu Nov 04, 2010 3:41 pm
by NicC
As far as I can see your header and trailer records are combined as record 6. How you got other records is unknown - I guess you are only showing part of the code? And do you not have to write each record - you PUT both but only show one WRITE. My Easytrieve manual is offline right now so I cannot look it up.

Re: Please solve this abend in easytreive

PostPosted: Fri Nov 05, 2010 12:31 am
by dick scherrer
Hello,

Actually my requirement is just to move header and trailer
How does one "move" a header or trailer?

What you call junk appears to be packed-decimal or binary data.

Suggest you post those 8 input records using HEX ON (before the code executes).

If the code did what you believe you want, what would these records look like?

Then post these records after the code executes.

It is not at all clear what you are asking. . . :?

Re: Please solve this abend in easytreive

PostPosted: Mon Nov 22, 2010 8:50 pm
by marta.doural
Hi haneef,

I'm not sure if this is what you need, but before writing a VB record, you have to tell Easytrieve how long is the record you are going to write:

**********************************************************************
JOB INPUT NULL
*
AMZ6P-ORG EQ 000
AMZ6P-BIN EQ 000000

AMZ6P : RECORD-LENGTH = 9
PUT AMZ6P
*
AMZ6P-ORG EQ 999
AMZ6P-BIN EQ 999999

AMZ6P : RECORD-LENGTH = 9
PUT AMZ6P
*
**********************************************************************


I've used this before and seems to work ok... is it valid for your problem?

Regards.