6
submitted 3 weeks ago* (last edited 3 weeks ago) by waspentalive@lemmy.one to c/linux@lemmy.ml

Any interest in this:

LJL is a job creation language that takes a job file, gathers items mentioned in its various lines and here-documents, and generates a runnable .deck file (short for "deck of cards").

The .deck file is a complex Bash script that creates a log spool and several temporary files in /tmp/. It automatically cleans up scratchable files after the run. The log file contains the output of each step, including any program results.

Any questions about it? Any suggestions?

top 6 comments
sorted by: hot top controversial new old
[-] waspentalive@lemmy.one 2 points 3 weeks ago

I manually created a .deck file to compile and run a Fortran program with specific data and to create a .log file of all the output, the Fortran program, and the data. I found it to be picky and somewhat hard. So I thought to myself: With something like JCL, one could take simple JCL-like statements, here documents for the source and data files, and programmatically combine them to make a script like the one I created manually.

[-] waspentalive@lemmy.one 2 points 3 weeks ago* (last edited 3 weeks ago)

More Detail::: What SUBMIT Does with Each LJL Statement:

For every statement, SUBMIT generates corresponding commands in the .deck file. Below is a step-by-step breakdown:

One //jo line, as many /dd lines as are required, and as many //ex as are required

//jo sumjob owner=me@mail.com log=print class=a

  • Generates a deck command to invoke ifclass a, which checks if the job's class allows execution at run time.

  • Generates a deck command to Log "sumjob is starting" to /var/log/JCL/ with a timestamp.

  • Generates a deck command to create /tmp/sumjob

  • Generates a deck command to initializes /tmp/sumjob/jobname.log with a formatted header (e.g., via figlet sumjob).

Job Classes: A = Runs as soon as submitted B = Runs only if load is low enough C = Runs in Off-Hours

//dd alias source(here|file=pathandfilename|new) disp(keep|scratch)

  • Note the disp (disposition) if keep the put the file in /home/user/.lcl/jobname as whatever the alias is if the disp(scratch) then the file will go into the /tmp/jobname directory as named by the alias.

  • Generate deck commands to

-- if source is here: copy lines from lcl up to '/*' to the deck file as a here document if source is a file: add commands to copy the file into a working directory either in user's home or in the tmp directory under the alias. //dd users source(file=/etc/passwd) disp(keep) ==> copy /etc/passwd to /home/user/.ljl/users

//ex somecommand --options < alias

-Generate doc commands to execute the program as specified and save the output to the logfile In this case echo (somecommand --options < aliasproperlyexpanded ) > logfile

The deck file now forms a fully functional batch file to do the specified computation.

[-] waspentalive@lemmy.one 1 points 2 weeks ago

What if one could use this to submit jobs to run on a local server (or a far away one) via email - mail lcl@remoteserver.org Then either paste in the lcl file or attach it to the email. If your owner clause is an email address, the job will be returned via email. The username on the owner clause has to be also a user on the remoteserver. If your username on the two machines differ, you may have to use a //ex to send the log back to you.

[-] waspentalive@lemmy.one 1 points 2 weeks ago* (last edited 2 weeks ago)

I have changed the syntax a little: //jo jobname owner(username) log(mailto=user@location) class(a) //** Note that the next step copies /etc/passwd to /tmp/jobname/passwd and then later deletes it when the job is done //dd passwd disp(scratch) source(file=/etc/passwd)
//ex cat passed //!! End of Job

[-] nanook@friendica.eskimo.com 0 points 3 weeks ago

Between bash (and the 40 or so other shells available under Linux), python, perl, and the several hundred other scripting languages already available, is a dedicated job control language really needed? I think unnecessary fluff.

[-] waspentalive@lemmy.one 2 points 3 weeks ago

It is not mandatory that you install it - Yes, there are other choices already. But in the beginning, Unix only had C and Assembly why didn't we just stick with those?

this post was submitted on 30 Apr 2025
6 points (80.0% liked)

Linux

54300 readers
267 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS