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
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.
Check your JCL.
Make sure you have defined work file 1 properly.
Not using any JCL. Just running program. SPoD is working but mainframe/CICS is not.
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
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.
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.
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.