# Working with workfile online.

**URL:** <https://techcommunity.softwareag.com/t/working-with-workfile-online/172842>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-News-and-General-Topics, Natural-on-Windows-Unix\
**Created:** [October 3, 2013, 9:09am UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842 "2013-10-03T09:09:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dion\_Kejlberg](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/dion_kejlberg/32/525_2.png) [@Dion\_Kejlberg](https://techcommunity.softwareag.com/u/Dion_Kejlberg)\
**Post date:** [October 3, 2013, 9:09am UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/1 "2013-10-03T09:09:51Z")

</div>

When I run this program from SPoD the workfile is updated, but when i run it from mainframe i get NAT1520 in the define statement.

Do I need to change some settings ?

define work file 1 wf-name /\* Existing file  
…  
write work 1 my-record  
…  
close work file 1

---

<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:** [October 3, 2013, 12:00pm UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/2 "2013-10-03T12:00:29Z")

</div>

The SPoD server is a separate environment with its own set of definitions, so yes,  
it looks like those in your online environment need to be amended in that area.

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [October 3, 2013, 12:03pm UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/3 "2013-10-03T12:03:26Z")

</div>

Check your JCL.  
Make sure you have defined work file 1 properly.

steve

---

<div class="post-metadata">

**Author:** ![Dion\_Kejlberg](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/dion_kejlberg/32/525_2.png) [@Dion\_Kejlberg](https://techcommunity.softwareag.com/u/Dion_Kejlberg)\
**Post date:** [October 3, 2013, 12:56pm UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/4 "2013-10-03T12:56:12Z")

</div>

Not using any JCL. Just running program. SPoD is working but mainframe/CICS is not.

---

<div class="post-metadata">

**Author:** ![Finn\_the\_Dane1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/finn_the_dane1/32/132_2.png) [@Finn\_the\_Dane1](https://techcommunity.softwareag.com/u/Finn_the_Dane1)\
**Post date:** [October 3, 2013, 1:16pm UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/5 "2013-10-03T13:16:56Z")

</div>

Hi Dion  
But the NDV-server that you connect to is started with a JCL that need to have workfile1 assigned in some way.  
Remember that you can actually make the link-assignment (i.e. filename) in the natural program.  
See doc: [http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/sm/definewo.htm](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/sm/definewo.htm)

Finn

---

<div class="post-metadata">

**Author:** ![Dion\_Kejlberg](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/dion_kejlberg/32/525_2.png) [@Dion\_Kejlberg](https://techcommunity.softwareag.com/u/Dion_Kejlberg)\
**Post date:** [October 3, 2013, 1:32pm UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/6 "2013-10-03T13:32:20Z")

</div>

Hi Finn

When i developed the program using SPoD, everything wortked just as i wanted. Then i tried running from CICS where i got the error (NAT1520).

I need to find something I can change in my CICS setting, just don’t know what and if it is possible.

---

<div class="post-metadata">

**Author:** ![Finn\_the\_Dane1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/finn_the_dane1/32/132_2.png) [@Finn\_the\_Dane1](https://techcommunity.softwareag.com/u/Finn_the_Dane1)\
**Post date:** [October 3, 2013, 1:37pm UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/7 "2013-10-03T13:37:32Z")

</div>

Hi Dion  
CICS does not allow programs to have their own “standard” files !  
But perhaps you can use the features below:

Customizing Print and Work File Usage  
The Natural CICS interface supports Natural print and work files in CICS either as CICS transient data queues or as CICS temporary storage queues, both auxiliary and main.

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [October 4, 2013, 3:56am UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/8 "2013-10-04T03:56:43Z")

</div>

SPoD has several components, with Natural for Windows being the one that can automatically create temporary work files in your tmp directory. As Finn says, under CICS you need to define temporary storage to do the same thing.

Perhaps you are using the wrong file number. The SYSFILE command will tell you if any WORK files have been defined.

---

<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, 3:29pm UTC](https://techcommunity.softwareag.com/t/working-with-workfile-online/172842/9 "2021-04-02T15:29:34Z")

</div>


