ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How to generate/run a Gen .NET application in batch

book

Article ID: 236997

calendar_today

Updated On:

Products

Gen Gen - Host Encyclopedia Gen - Run Time Distributed Gen - Workstation Toolset

Issue/Introduction

Needing to generate batch jobs targeting .NET/C# using Gen., but not finding anything in the Gen documentation about how to do that. In fact there is very little about using Gen for batch that I can find. It's all geared towards distributed online client/server type processing.
Is it possible to generate C# code from Gen which runs in the .NET framework but not under Component Services (so not server code)? If so, how is that done?  
If not, is there a way to mimic batch jobs / runs in .NET using code generated from Gen ?

Environment

Release : 8.6

Component : Gen Generator/Run Time for .NET

Resolution

The lack of .NET/C# for batch mainly relates to the historical development of Gen/IEF and original IEF block mode applications for which COBOL and C were the languages.
BATCH was created purely for COBOL/Mainframe JES.
For distributed platforms using C the "online no display" property for a PStep effectively enabled the same type of background execution (can be used with Unix/Linux cron or Windows Task Scheduler etc)
When support for Java and C#/.NET was introduced later, they were envisaged as client/server applications and the requirement for "batch" was probably never considered and since then there has probably never been enough user demand/idea creation for a "batch" option.
There are ways to workaround the limitation using a Gen proxy to call a Gen server. The latter can be done in an asynchronous mode (Synchronous vs. Asynchronous Processing) to provide an unattended execution mechanism i.e. batch. 

Additional Information

Community threads:
Batch processing in .NET using Gen
Mainframe Re-Platform