I keep getting IEFC452I errors, what's wrong? - jcl

//name JOB 1,NOTIFY=&SYSUID
//sort01 exec pgm=sort
//sysout dd sysout=*
//sysprint dd sysout=*
//sysudump dd sysout=*
//sortin dd disp=shr,dsn=public.data(ascii)
//sortout dd sysout=*
//sysin dd *
sort fields=(1,1,ch,a)

The message you are getting is IEFC452I text - JOB NOT RUN - JCL ERROR
The value of text will be your userid plus the character(s) you entered when you were asked after the SUBMIT.
If you look at file two of your output, you will see a shedload of other messages.
Your problem is that JCL can only be written in uppercase.
Is this a contest, or a course? We had exactly the same JCL (different problem) a couple of days ago.
If you change everything to uppercase (in the line-number area type uc99 on the first line, and it will "uppercase" the next 99 lines (saving you having to work out how many) and assuming your dataset exists you will be good to go.
As with the other question, for a SORT step, SYSYDUMP and SYSPRINT are irrelevant. Delete those lines.
Also note that you have a SORT Control Card, which is not itself JCL, but also needs to be in uppercase.

Related

Converting email metadata RFC 5322 dates to Org mode dates in doom emacs

I have about 200 old emails, as *.eml files, that I want to concatenate into one *.org file so that I can use the information in Org mode. Each file has the string "Date: " followed by a timestamp in the RFC 5322 date format, i.e.
Date: Tue, 23 Apr 2019 13:31:18 -0400
I know the UNIX date command can convert the date part of that string to RFC 3339 date format, i.e. the command:
date --rfc-3339='ns' --date='Tue, 23 Apr 2019 13:31:18 -0400'
would give the result:
2019-04-23 13:31:18.000000000-04:00
I guess I could do all the conversion with awk in one go, but my awk is rusty, and I've been having trouble getting it right.
I'd really like to convert all of these dates to Org mode dates with one command, either using a vi command or a doom emacs command.
Any suggestions?
You could build up a regular expression for use with M-x query-replace-regexp which invokes a shell command to use the date command you mention above. The trick is the \, replacement option which allows you to execute any Emacs LISP code, as described in the Regexp Replacement section of the Emacs info manual.

Interpret ISO week-of-year in gnu coreutils

Gnu date is usually pretty flexible with input to its --date option. However I find it is not giving me expected results using the ISO-8601 format for week-of-year that I found on wikipedia, namely yyyy-'W'ww or yyyy-'W'ww-d:
$ date -d 2019-W14-2 # expect some variation on 2019-04-02
date: invalid date '2019-W14-2'
Is there any format with which I can ask date to tell me about the 14th week of 2019?
I've tracked the relevant code down to gnulib module parse-datetime. It looks like this would have to be a new feature. I'll update this space if it's ever implemented.

JCL append date/time to a file?

How do I add the current date/time to a file in JCL?
For example, from the JCL:
//INPUT DD *
CGQ-TEST.ISQCQ.NET
ASCII
LOCSITE SBD=SYSP.FTP.RCAMSI
SENDSITE
PUT 'TJ.UTJ0IR86.BC814.HDR' BC814001.TMP
APPEND 'TJ.UTJ4IR86.BC(0)' BC814001.TMP
APPEND 'TJ.UTJ0IR86.BC814.TRL' BC814001.TMP
RENAME BC813001.TMP BC814001.TXT
CLOSE
QUIT
I need the file BC814001.TXT to actually be BC814001.20160930.110900.ent, where 20160930.110900 is current date and time (YYYYMMDD.HHMMSS format).
The best way to do this is to use the features of your job scheduling package (Control-M or one of its competitors). It's usually the most maintainable. Talk to your production control staff.
If for some reason that won't work for you, please see this answer.
The convention fd dataset level qualifiers limits you only to 8 characters per section (space between dots) and it should start with a character not a number.
Each name segment (qualifier) is 1 to 8 characters, the first of which must be alphabetic (A to Z) or national (# # $). The remaining seven characters are either alphabetic, numeric (0 - 9), national, a hyphen (-). Name segments are separated by a period (.).
For z/OS environments I would go with 'day of the year' for the actual date. For example in your case - BC814001.D2016274.T110900.ent.
To get the current date and time You can refer to the TSO DATE and TSO TIME via REXX and format them the way You like (examples here http://www.rexxla.org/rexxlang/mfc/datec.html) then pass them as a variable to your SYSIN statement.
Regards,
Jarek.

Alfresco: changing date and time formats

I have a few places where I need to change how the date format displays in my Alfresco share:
Calendar Format
Needs to be in MM/DD/YYYY format.
Date in Info.ftl Control
Needs to be in DDD MM DD YYYY format.
Date().toString()
This is being displayed in a data list. Ideally it should read: "Tue Jul 2015 8:27:51 (EST)"
I located common.properties and made the following changes:
## Date Formats
#Used client side (uses Alfresco.util.formatDate)
date-format.default=mmm ddd d yyyy HH:MM:ss
date-format.defaultDateOnly=mmm ddd d yyyy
date-format.shortDate=m/d/yy
date-format.mediumDate=mmm d, yyyy
date-format.mediumDateNoYear=mmm d
date-format.longDate=mmmm dd, yyyy
date-format.longDateNoYear=mmmm dd
date-format.fullDate=mmmm, d dddd, yyyy
date-format.fullDateTime=mmmm, d dddd, yyyy 'at' h:MM TT
date-format.shortTime=h:MM TT
date-format.mediumTime=h:MM:ss TT
date-format.longTime=h:MM:ss TT Z
date-format.monthYear=mmmm yyyy
date-format.dayDateMonth=mmmm, d dddd
date-format.am=am
date-format.pm=pm
But none of them seem to affect any date formats anywhere. My questions:
Where do I need to make additional changes to get the above formats to work?
How do I change the time zone?
Essentially, I need to change everything to Eastern US time zone and formats.
Different files where date format are mentioned. Each of them are responsible for rendering dates in different places
<ALF_HOME>\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form\form.get_en.properties
<ALF_HOME>\tomcat\webapps\share\WEB-INF\classes\alfresco\messages\common.properties
<ALF_HOME>\tomcat\webapps\share\WEB-INF\classes\alfresco\messages
common.properties\slingshot.properties
We need to edit the \tomcat\webapps\share\WEB-INF\classes\alfresco\messages\common.properties as well as \tomcat\webapps\share\WEB-INF\classes\alfresco\messages\common_en.properties the second file the locale specific file should also be modified.
Modify the below key's value
date-format.default=mm/dd/yyyy
These changes only impact the display format of date, if we need to make changes for form we need to modify in \tomcat\shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\form**form.get_en.properties** and form.get.properties.
Hope this will help you :)

What is a good way to encode diffs in absence of the source text?

The situation is this like: there's some text
hello world!
It is processed by my tool and is converted to some symbolic form, e.g.
[hello#0, world#6]
(notice how the ! is discarded).
Now my tool wants to recommend adding there to the original source text. My tool can send textual data back, so it makes sense to encode the delta in some format and send it back. Here's an example with diff:
1c1
< hello world!
---
> hello there world!
But the problem is that I cannot use the classical diff format because I don't have the original text any longer, and I can't produce that text from my model accurately (for example, because the ! is missing).
My question is, is there some standard textual format that can encode modifications in the middle of the line without knowing the entire line? Something like:
insert 'there ' at 1:6
I know diff itself has a few other possible output formats, but I could not spot anyone which can add things to the middle of a line without needing the entire new line content.
One of the output formats of diff is an ed script with diff -e. Now, diff produces ed scripts that make line-oriented edits, like delete lines or insert lines.
But since you're not necessarily using diff, you can make your tool output a finer-grained ed script which performs insertions and substitutions within a line.
Ed does not support numeric addressing of the characters within a line, but it can be done with regular expression match/replace.
To replace an n-character sequence starting at column m (counting from 1) with the text rep, you can use this command:
s/\(.\{m-1\}\).\{n\}/\1rep/
Here m-1 and n are replaced by decimal numbers. If m happens to be 1, then just
s/.\{n\}/&rep/
Your program has be careful about escaping the characters of rep, of course.
The edits are then applied to a file like this:
$ cp file file.tmp # operate in-place on file.tmp
$ (cat diffs ; echo wq) | ed -q file.tmp # edits are in file "diffs"