Page 1 of 2

B054 Error in Easytrieve

PostPosted: Sun Nov 02, 2008 6:27 am
by tavisha
Hi all,

I am receieving a B054 NOT A VALID FILE error in my program when I m trying to write into a file.This file is neither an input nor an output file.I am using it temporarily in my program. I have declared the file as well as defined all the fields.Please puts some light on how to remove this error.

Re: B054 Error in Easytrieve

PostPosted: Sun Nov 02, 2008 6:38 am
by dick scherrer
Hello tavisha and welcome to the forum,

This file is neither an input nor an output file.
It may be both, but it is not neither. . . I suspect you both write to it and read from it.

Posting the definition of the file and the code that references will help us help you.

Re: B054 Error in Easytrieve

PostPosted: Sun Nov 02, 2008 8:35 am
by tavisha
I meant to say that I am just writing in this file temporarily and then reading this file and doing my data processinng.

I have decared my file variables as
FILE FILENM FB(27 2700)
FM-ALLNC-ID 1 2 A
FM-APLYD-DT 3 10 A
FM-BTCH-NUM 13 2 B 0
FM-AMT 15 6 P 2
FM-CLS-CD 21 1 A
FM-CA-CD 22 2 A
FM-CA-ID 24 4 B 0 MASK ('ZZZZZZZZZ9').

Re: B054 Error in Easytrieve

PostPosted: Sun Nov 02, 2008 8:56 am
by dick scherrer
Hello,

I meant to say that I am just writing in this file temporarily and then reading this file and doing my data processinng.
Ok :)

Please post the jcl for this step and the code that references this file.

If you did not include a DD statement for this file, add one and run the test again.

Re: B054 Error in Easytrieve

PostPosted: Sun Nov 02, 2008 1:55 pm
by tavisha
Hi
Well I have included the DD statement for the file.
EZTREV01 EXEC EZTPLUST,TIME=60,SYSPRNT='*'               
FILEIN   DD DSN=009734.TAVISHA.SRT,DISP=SHR (INPUT)
FILENM   DD DSN=009734.TAVISHA.FILEMAIN,       (TEMP)           
            UNIT=SYSDA,STORCLAS=TEST,                     
            SPACE=(TRK,(100,100),RLSE),                   
            DCB=(RECFM=FB,LRECL=27,BLKSIZE=2700),         
            DISP=(NEW,CATLG,DELETE)                       
FILEOUT  DD DSN=009734.TAVISHA.FILEOUT,        (OUTPUT)
            UNIT=SYSDA,STORCLAS=PROD,                     
            SPACE=(TRK,(100,100),RLSE),                   
            DCB=(RECFM=FB,LRECL=4800,BLKSIZE=0),         
            DISP=(NEW,CATLG,DELETE)                       

As far as code is concerned I am just doing
GET FILEIN (this is my input file)
initializing the variables for FILENM
FM-ALLNC-ID = ' '
FM-APLYD-DT = ' '
FM-BTCH-NUM = 0
FM-AMT = 0
FM-CLS-CD = ' '
FM-CA-CD = ' '
FM-CA-ID = 0

Checking for particular conditions and then moving the variables of input file to this temp file
FM-ALLNC-ID = FI-ALLNC-ID
FM-APLYD-DT = FI-APLYD-DT
FM-BTCH-NUM = FI-BTCH-NUM
FM-AMT = FI-AMT
FM-CLS-CD = FI-CLS-CD
FM-CA-CD = FI-CA-CD
FM-CA-ID = FI-CA-ID

PUT FILENM (finally putting it in this file)

Please guide where m I going wrong.Thanks for ur prompt reply.

Re: B054 Error in Easytrieve

PostPosted: Sun Nov 02, 2008 6:35 pm
by dick scherrer
Hello,

Did you get the same b054 error?

You might remove the "mask" from the last field and run a test.

For this file you probably don't want to catalog it - disp=(new,pass) would probably be a better choice. Also, depending on your system standards, you may need to change the dsn to a "temp" dsn rather than a "real" name.

When you post jcl, code, control statements, etc., it is best to use the "Code" tag to preserve your alignment. Use Preview to see how your post will appear to the forum rather than how things look in the Reply editor. When you are satisied with how your post appears, Submit.

Re: B054 Error in Easytrieve

PostPosted: Sun Nov 02, 2008 11:23 pm
by tavisha
Tried with all the changes that u suggested but still its giving the same error :(

Re: B054 Error in Easytrieve

PostPosted: Mon Nov 03, 2008 12:01 am
by dick scherrer
Hello,

Please post the Easytrieve output from the run - put the error line in the middle and copy/paste several lines before and after the error line.

Another thing you might try is to pre-allocate the dataset (with a real dsn, and complete dcb info) and refer to it as disp=old in your easytrieve step.

Re: B054 Error in Easytrieve

PostPosted: Mon Nov 03, 2008 12:30 am
by dick scherrer
Hello again. . .

Have you posted the exact jcl you are using?

If appears you have dsns beginning with zeros - this is invalid (i would have expected a jcl error before ever reachhnig the ezt code).

FWIW - your file definition works correctly on one of my systems. . .

Re: B054 Error in Easytrieve

PostPosted: Mon Nov 03, 2008 12:42 am
by tavisha
I had just changed the dataset names in the JCL for the forum only.Rest declaration is the same as I had mentioned it.
Well Easytrieve output is:-

114 IF FI-TBNUM-BTCH-NUM GE BATCH-START (MSUB, BSUB)
AND FI-TBNUM-BTCH-NUM LE BATCH-END (MSUB, BSUB)
115 IF FI-BS-ALLNC-ID = 'NI'
116 CNT-NI = CNT-NI + 1
117 ELSE
118 IF FI-BS-ALLNC-ID = 'NF'
119 CNT-NF = CNT-NF + 1
120 ELSE
121 CNT-KM = CNT-KM + 1
122 END-IF
123 END-IF

124 * WS-BS-ALLNC-ID = FI-BS-ALLNC-ID
125 * WS-PYMT-APLYD-DT = FI-PYMT-APLYD-DT
126 * WS-TBNUM-BTCH-NUM = FI-TBNUM-BTCH-NUM
127 * WS-PYMT-AMT = FI-PYMT-AMT
128 * WS-CACLAS-CD = FI-CACLAS-CD
129 * WS-CATYP-CD = FI-CATYP-CD
130 * WS-CA-ID = FI-CA-ID

131 * FM-BS-ALLNC-ID = WS-BS-ALLNC-ID
132 * FM-PYMT-APLYD-DT = WS-PYMT-APLYD-DT
133 * FM-TBNUM-BTCH-NUM = WS-TBNUM-BTCH-NUM
134 * FM-PYMT-AMT = WS-PYMT-AMT
135 * FM-CACLAS-CD = WS-CACLAS-CD
136 * FM-CATYP-CD = WS-CATYP-CD
137 * FM-CA-ID = WS-CA-ID

138 FM-BS-ALLNC-ID = FI-BS-ALLNC-ID
139 FM-PYMT-APLYD-DT = FI-PYMT-APLYD-DT
140 FM-TBNUM-BTCH-NUM = FI-TBNUM-BTCH-NUM
141 FM-PYMT-AMT = FI-PYMT-AMT
142 FM-CACLAS-CD = FI-CACLAS-CD
143 FM-CATYP-CD = FI-CATYP-CD
144 FM-CA-ID = FI-CA-ID

145 PUT FILENM
145 *******B054 NOT A VALID FILE - FILENM
146 ELSE
147 BATCH-DONE-IND = 'Y'
148 END-IF
149 END-PROC


Also please guide how to go about the second solution that u had given:-
Another thing you might try is to pre-allocate the dataset (with a real dsn, and complete dcb info) and refer to it as disp=old in your easytrieve step.