<commit_before>package org.asup.os.type.jobd.base.api;

import javax.inject.Inject;

import org.asup.fw.core.annotation.Supported;
import org.asup.fw.core.annotation.ToDo;
import org.asup.il.data.BinaryType;
import org.asup.il.data.DatetimeType;
import org.asup.il.data.QBinary;
import org.asup.il.data.QCharacter;
import org.asup.il.data.QDataStructDelegator;
import org.asup.il.data.QDatetime;
import org.asup.il.data.QEnum;
import org.asup.il.data.QScroller;
import org.asup.il.data.annotation.DataDef;
import org.asup.il.data.annotation.Entry;
import org.asup.il.data.annotation.Program;
import org.asup.il.data.annotation.Special;
import org.asup.os.core.OperatingSystemException;
import org.asup.os.core.OperatingSystemRuntimeException;
import org.asup.os.core.Scope;
import org.asup.os.core.jobs.QJob;
import org.asup.os.core.jobs.QJobLogManager;
import org.asup.os.core.resources.QResourceWriter;
import org.asup.os.type.QTypedObject;
import org.asup.os.type.QTypedReference;
import org.asup.os.type.impl.OperatingSystemTypeFactoryImpl;
import org.asup.os.type.jobd.QJobDescription;
import org.asup.os.type.jobd.QJobDescriptionManager;
import org.asup.os.type.jobd.QOperatingSystemJobDescriptionFactory;

@Supported
@Program(name = "QWDCCRG")
public  class JobDescriptionCreator {

	@Inject
	private QJobDescriptionManager jobDescriptionManager;
	@Inject
	private QJob job;
	@Inject
	private QJobLogManager jobLogManager;

	public @Entry void main(
			@Supported @DataDef(qualified = true) JobDescription jobDescription,
			@Supported @DataDef(qualified = true) JobQueue jobQueue,
			@Supported @DataDef(length = 1) QCharacter jobPriorityonJOBQ,
			@Supported @DataDef(length = 1) QCharacter outputPriorityonOUTQ,
			@DataDef(length = 10) QEnum<PrintDeviceEnum, QCharacter> printDevice,
			@DataDef(qualified = true) QEnum<OutputQueueEnum, OutputQueue> outputQueue,
			@Supported @DataDef(length = 50) QEnum<TextDescriptionEnum, QCharacter> textDescription,
			@Supported @DataDef(length = 10) QEnum<UserEnum, QCharacter> user,
			@DataDef(length = 15) QEnum<AccountingCodeEnum, QCharacter> accountingCode,
			@DataDef(length = 30) QEnum<PrintTextEnum, QCharacter> printText,
			@ToDo @DataDef(length = 80) QEnum<RoutingDataEnum, QCharacter> routingData,
			@ToDo @DataDef(length = 256) QEnum<RequestDataOrCommandEnum, QCharacter> requestDataOrCommand,
			@Supported @DataDef(dimension = 250, length = 10) QEnum<InitialLibraryListEnum, QScroller<QCharacter>> initialLibraryList,
			@DataDef(length = 10) QEnum<InitialASPGroupEnum, QCharacter> initialASPGroup,
			MessageLogging messageLogging,
			@DataDef(length = 1) QEnum<LogCLProgramCommandsEnum, QCharacter> logCLProgramCommands,
			@DataDef(length = 10) QEnum<JobLogOutputEnum, QCharacter> jobLogOutput,
			@DataDef(binaryType = BinaryType.SHORT) QEnum<JobMessageQueueMaximumSizeEnum, QBinary> jobMessageQueueMaximumSize,
			@DataDef(length = 10) QEnum<JobMessageQueueFullActionEnum, QCharacter> jobMessageQueueFullAction,
			@DataDef(binaryType = BinaryType.SHORT) QEnum<CLSyntaxCheckEnum, QBinary> cLSyntaxCheck,
			@DataDef(binaryType = BinaryType.SHORT) QBinary endSeverity,
			@DataDef(length = 1) QEnum<InquiryMessageReplyEnum, QCharacter> inquiryMessageReply,
			@DataDef(length = 1) QEnum<HoldOnJobQueueEnum, QCharacter> holdOnJobQueue,
			@DataDef(datetimeType = DatetimeType.DATE) QEnum<JobDateEnum, QDatetime> jobDate,
			@DataDef(length = 8) QCharacter jobSwitches,
			@DataDef(length = 13) QEnum<DeviceRecoveryActionEnum, QCharacter> deviceRecoveryAction,
			@DataDef(length = 10) QEnum<TimeSliceEndPoolEnum, QCharacter> timeSliceEndPool,
			@DataDef(length = 10) QEnum<AuthorityEnum, QCharacter> authority,
			@DataDef(length = 1) QEnum<AllowMultipleThreadsEnum, QCharacter> allowMultipleThreads,
			@DataDef(length = 10) QEnum<SpooledFileActionEnum, QCharacter> spooledFileAction,
			@DataDef(length = 10) QEnum<DDMConversationEnum, QCharacter> dDMConversation) {

		QResourceWriter<QJobDescription> resource = null;
		
		String library = null;
		switch (jobDescription.library.asEnum()) {
		case CURLIB:
			library = jobDescription.library.getSpecialName();
			resource = jobDescriptionManager.getResourceWriter(job, Scope.CURRENT_LIBRARY);
			break;
		case OTHER:
			library = jobDescription.library.asData().trimR();
			resource = jobDescriptionManager.getResourceWriter(job, library);
			break;
		}

		QJobDescription qJobDescription = resource.lookup(jobDescription.name.trimR());
		if (qJobDescription != null)<commit_msg>Issue #16<commit_after>package org.asup.os.type.jobd.base.api;

import javax.inject.Inject;

import org.asup.fw.core.annotation.Supported;
import org.asup.fw.core.annotation.ToDo;
import org.asup.il.data.BinaryType;
import org.asup.il.data.DatetimeType;
import org.asup.il.data.QBinary;
import org.asup.il.data.QCharacter;
import org.asup.il.data.QDataStructDelegator;
import org.asup.il.data.QDatetime;
import org.asup.il.data.QEnum;
import org.asup.il.data.QScroller;
import org.asup.il.data.annotation.DataDef;
import org.asup.il.data.annotation.Entry;
import org.asup.il.data.annotation.Program;
import org.asup.il.data.annotation.Special;
import org.asup.os.core.OperatingSystemException;
import org.asup.os.core.OperatingSystemRuntimeException;
import org.asup.os.core.Scope;
import org.asup.os.core.jobs.QJob;
import org.asup.os.core.jobs.QJobLogManager;
import org.asup.os.core.resources.QResourceWriter;
import org.asup.os.type.QTypedObject;
import org.asup.os.type.QTypedReference;
import org.asup.os.type.impl.OperatingSystemTypeFactoryImpl;
import org.asup.os.type.jobd.QJobDescription;
import org.asup.os.type.jobd.QJobDescriptionManager;
import org.asup.os.type.jobd.QOperatingSystemJobDescriptionFactory;

@Supported
@Program(name = "QWDCCRG")
public  class JobDescriptionCreator {

	@Inject
	private QJobDescriptionManager jobDescriptionManager;
	@Inject
	private QJob job;
	@Inject
	private QJobLogManager jobLogManager;

	public @Entry void main(
			@Supported @DataDef(qualified = true) JobDescription jobDescription,
			@Supported @DataDef(qualified = true) JobQueue jobQueue,
			@Supported @DataDef(length = 1) QCharacter jobPriorityonJOBQ,
			@Supported @DataDef(length = 1) QCharacter outputPriorityonOUTQ,
			@DataDef(length = 10) QEnum<PrintDeviceEnum, QCharacter> printDevice,
			@DataDef(qualified = true) QEnum<OutputQueueEnum, OutputQueue> outputQueue,
			@Supported @DataDef(length = 50) QEnum<TextDescriptionEnum, QCharacter> textDescription,
			@Supported @DataDef(length = 10) QEnum<UserEnum, QCharacter> user,
			@DataDef(length = 15) QEnum<AccountingCodeEnum, QCharacter> accountingCode,
			@DataDef(length = 30) QEnum<PrintTextEnum, QCharacter> printText,
			@ToDo @DataDef(length = 80) QEnum<RoutingDataEnum, QCharacter> routingData,
			@ToDo @DataDef(length = 256) QEnum<RequestDataOrCommandEnum, QCharacter> requestDataOrCommand,
			@Supported @DataDef(dimension = 250, length = 10) QEnum<InitialLibraryListEnum, QScroller<QCharacter>> initialLibraryList,
			@DataDef(length = 10) QEnum<InitialASPGroupEnum, QCharacter> initialASPGroup,
			MessageLogging messageLogging,
			@DataDef(length = 1) QEnum<LogCLProgramCommandsEnum, QCharacter> logCLProgramCommands,
			@DataDef(length = 10) QEnum<JobLogOutputEnum, QCharacter> jobLogOutput,
			@DataDef(binaryType = BinaryType.SHORT) QEnum<JobMessageQueueMaximumSizeEnum, QBinary> jobMessageQueueMaximumSize,
			@DataDef(length = 10) QEnum<JobMessageQueueFullActionEnum, QCharacter> jobMessageQueueFullAction,
			@DataDef(binaryType = BinaryType.SHORT) QEnum<CLSyntaxCheckEnum, QBinary> cLSyntaxCheck,
			@DataDef(binaryType = BinaryType.SHORT) QBinary endSeverity,
			@DataDef(length = 1) QEnum<InquiryMessageReplyEnum, QCharacter> inquiryMessageReply,
			@DataDef(length = 1) QEnum<HoldOnJobQueueEnum, QCharacter> holdOnJobQueue,
			@DataDef(datetimeType = DatetimeType.DATE) QEnum<JobDateEnum, QDatetime> jobDate,
			@DataDef(length = 8) QCharacter jobSwitches,
			@DataDef(length = 13) QEnum<DeviceRecoveryActionEnum, QCharacter> deviceRecoveryAction,
			@DataDef(length = 10) QEnum<TimeSliceEndPoolEnum, QCharacter> timeSliceEndPool,
			@DataDef(length = 10) QEnum<AuthorityEnum, QCharacter> authority,
			@DataDef(length = 1) QEnum<AllowMultipleThreadsEnum, QCharacter> allowMultipleThreads,
			@DataDef(length = 10) QEnum<SpooledFileActionEnum, QCharacter> spooledFileAction,
			@DataDef(length = 10) QEnum<DDMConversationEnum, QCharacter> dDMConversation) {

		QResourceWriter<QJobDescription> resource = null;
		
		String library = null;
		switch (jobDescription.library.asEnum()) {
		case CURLIB:
			resource = jobDescriptionManager.getResourceWriter(job, Scope.CURRENT_LIBRARY);
			break;
		case OTHER:
			library = jobDescription.library.asData().trimR();
			resource = jobDescriptionManager.getResourceWriter(job, library);
			break;
		}

		QJobDescription qJobDescription = resource.lookup(jobDescription.name.trimR());
		if (qJobDescription != null)
{'fraction_non_alphanumeric': 0.10486933214205942, 'fraction_numerical': 0.009828009828009828, 'mean_word_length': 6.563344594594595, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5111263', 'n_tokens_mistral': 3184, 'n_tokens_neox': 2894, 'n_words': 528}