When I submit a job I will be creating a dynamic Natural program in the dataset. Now I want to copy the natural program which is created in dataset dynamically into natural source. Is there any job to do the same. If so please provide sample JCL.
Here is a sample CMSYNIN to code a ad hoc program in a batch job:
//CMSYNIN DD *
LOGON KSP
EDT
DEFINE DATA LOCAL
1 A(A10) INIT <'HELLO'>
END-DEFINE
WRITE A 'WORLD'
END
.E
RUN
EDT is the Natural line editor to use in batch. With .E you quit EDT. The source program remains in the source area and can be executed with the following RUN command.
You can also insert a STOW ANYNAME to stow the source program.
Thanks KLaus for quick response, actully my requirment is I have natural program in dataset, now I want to copy the program in natiral source and I have to run the program. when I copy the program into natural source then only I can give program name, but is there any job to do copy from dataset into natura source.
At various times and for various reasons, I maintain Natural source modules as members of a PDS. I like to separate source code from Natural commands, so my JCL looks like this:
//CMSYNIN DD *
LOGON library
EDT
/*
// DD DSN=my.pds.lib(########),DISP=SHR
// DD *
.E
SA ########
FIN
/*
The commands exist only once, rather than in each source member.
In TSO, I use the following command string to load a module into a Natural library:
Rahesh, i get this in from system when I run your jcl:
Jun 22, 2007 National General Insurance Company
08:54:41 AM Data Processing Department
************** A Batch Program Processing Error Has Occurred
End of file in input after continuation.
Program
Job TEMBNT22
Application GPLUS
Level 1
Error Line
Error Number 1124
Contact NGI Data Processing