Call to API in foreground gets allocation error
search cancel

Call to API in foreground gets allocation error

book

Article ID: 237840

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

A call to API fails with error:
+ENA$NDV1 - API HALTED, AACTL MSG DD STMT, MSG3FILE IS MISSING,RC=00016 RE=00002

Environment

Release : 18.0

Component : Endevor Software Change Manager

Cause

If Allocation error occurs when running your API in foreground, this generally means that Files MSG3FILE and EXT1FILE have not been allocated. 
When running in Foreground (or under Quickedit) the DDname C1MSGS1, MSG3FILE and EXT1FILE are not allocated by default. 
Therefore, if an API is executed, for example if the API is called by an Exit, 
you must ensure that this files and any other files required by your API and exit have been allocated. 

Resolution

The sample SOURCE(CCIDRPT1), shows how to allocate those files in an API. 
These files can be allocated in the Endevor or Quick-Edit starter set(Clist ENDEVOR or ENDICLS1 from CSIQCLS0).

Here are the commands : 
1 - Dataset Allocate 
"TSO ALLOC DSN('filename') CYL SPACE(5 5) DSORG(PS) RECFM(F B) LRECL(133)" 
"TSO ALLOC fi(ddname) DSN('filename') SHR REU" 
To Release the file 
"TSO FREE fi('ddname')" 
2 - Sysout Allocate 
"TSO ALLOC FI('ddname') SYSOUT(X) LRECL(133)" 
to Release the file
"TSO FREE FI('ddname')" 

Example to allocate file to allow execution of the API in foreground:
TSO ALLOC F(EXT1FILE) LRECL(2048) RECFM(V) NEW 
TSO ALLOC F(MSG3FILE) LRECL(133) RECFM(F) NEW