Read/write work files localy with naturalone

I want to know how can I set Work files 1 and 2. I want to be able to read and write a work file localy in my PC with NaturalOne.

Using natural one version 10

Error messages / full error message screenshot / log file:

Question related to a free trial, or to a production (customer) instance?

DEFINE WORK FILE n '<filename>'

Thanks for your help Wolfgang. I am getting the followin error message:

NAT1509 DYNAMIC ALLOCATION FOR WORK FILE FAILED CMWKF01.RC:035C 0002

I am not sure if it is neccesary to define or set something before oppenning naturalone session at the natparm or any other place.

IBM reports:
|035C|(860)|Meaning: Invalid PARM specified in text unit. The accompanying message IKJ56231I identifies the text unit in error. (all dynamic allocation functions)2

Application programmer action: See the description of the text unit and correct the error.

Corresponding message: IKJ56231I|
Do you have the IKJ56231I error message (it might show up on your NDV server task)?

Can you show what is in your program’s DEFINE WORK FILE statement? Also note that the program is executing in your NDV server on the mainframe, not on your PC, so it can’t access PC files directly without Natural Connection. Your other option is to transfer the PC file to the mainframe and supply the mainframe file name to your DEFINE WORK FILE statement.

Hi Douglas, thanks for your information.

DEFINE WORK FILE 1 ‘C:\USERS\B726222\WORKFILES\BANCO.CSV’ TYPE ‘CSV’
RD1. READ (100) BTRM1BCO BY CIM1-SWIFT
DISPLAY BTRM1BCO
COMPRESS CIM1-SWIFT ‘;’
CIM1-CODSUC ‘;’
CIM1-CTAMAY
INTO #WORKILE LEAVING NO
WRITE WORK FILE 1 #WORKILE
END-READ
CLOSE WORK FILE 1
END

this is the code, it is very simple, but I am no using natural connection. I didn’t know it would be required. Thanks for your help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.