To format SQLCA we are using dsntiar utility but getting return code 8. Google says ..return code 8 means "error record length is not between 72 and 240 "
Can anyone please explain when this error comes ?
Joined: 22 Apr 2006 Posts: 6254 Location: Mumbai, India
DSNTIAR expects the SQLCA to be in a certain format. If your application modifies the SQLCA format before you call DSNTIAR, the results, as IBM says, are unpredictable. So first check that.
Second, in your program, you should define a message area something like this:
02 ERR-LENGTH PIC S9(4) COMP VALUE +720.
02 ERR-TEXT PIC X(72) OCCURS 10 TIMES
INDEXED BY ERR-INDEX.
77 ERR-TEXT-LENGTH PIC S9(9) COMP VALUE +72.
This assumes - you want an area for up to 10 lines of length 72. With this in mind , you should define an area of 720 bytes, plus a 2-byte area that specifies the length of the message output area. If your program does not comply with these, well you've a trouble.