# How to check the external files?

**URL:** <https://techcommunity.softwareag.com/t/how-to-check-the-external-files/75121>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-News-and-General-Topics\
**Created:** [July 30, 2007, 6:27pm UTC](https://techcommunity.softwareag.com/t/how-to-check-the-external-files/75121 "2007-07-30T18:27:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Smith](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/john_smith/32/39012_2.png) [@John\_Smith](https://techcommunity.softwareag.com/u/John_Smith)\
**Post date:** [July 30, 2007, 6:27pm UTC](https://techcommunity.softwareag.com/t/how-to-check-the-external-files/75121/1 "2007-07-30T18:27:22Z")

</div>

Hi,

I wonder if there is a way to check if an external file such as workfile, images, xml,…exist, before accessing them.

I don’t know if there are APIs or User Exits for it.

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 30, 2007, 7:38pm UTC](https://techcommunity.softwareag.com/t/how-to-check-the-external-files/75121/2 "2007-07-30T19:38:50Z")

</div>

Is this question related to Mainframe or OpenSystems Natural ?

---

<div class="post-metadata">

**Author:** ![John\_Smith](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/john_smith/32/39012_2.png) [@John\_Smith](https://techcommunity.softwareag.com/u/John_Smith)\
**Post date:** [August 2, 2007, 3:25am UTC](https://techcommunity.softwareag.com/t/how-to-check-the-external-files/75121/3 "2007-08-02T03:25:28Z")

</div>

Hi Wolfgang,

This is open system question - (Linux/Unix) envrionment, but if you have solution for both - MF and OS - I would be so glad to hear both.

Thanks

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [August 2, 2007, 4:52am UTC](https://techcommunity.softwareag.com/t/how-to-check-the-external-files/75121/4 "2007-08-02T04:52:21Z")

</div>

Use SYSEXT and check out the APIs under keyword WORKFILE.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [August 2, 2007, 1:39pm UTC](https://techcommunity.softwareag.com/t/how-to-check-the-external-files/75121/5 "2007-08-02T13:39:41Z")

</div>

Or use USR1052N (also in library SYSEXT) to check file existence with ‘ls’ commands or the like.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:48pm UTC](https://techcommunity.softwareag.com/t/how-to-check-the-external-files/75121/6 "2021-04-02T14:48:36Z")

</div>


