I've been digging through here for a couple days without luck, and JCL isn't my strength, so have mercy, but here's the issue in a nutshell - I have a couple JCL that run after a nightly batch cycle, take 70 odd .csv files created during the cycle, squish them together, sort them and mail them as a report. Everything worked, but now they want date and time as part of the file names. I added an EZCAFSM1 step and create the file name as a variable:
... and this works fine, giving me the sorted output file name just like I want it. However, it's when I try and use that as an attachment that I have issues. In this step the main body of the email is in .SMTPHDR
(There is a blank line after 'FILENAME=') This is the only place the substitution isn't working. I've tried with or without quotes, it simply sends whatever is after FILENAME= as a literal. How do I get the substitution into the .SMTPHDR, or do I need to redo how the email is constructed?
Hopefully I explained this well enough. Thanks in advance!
Which SORT product do you have? DFSORT supports JCL symbols, up to 10 of them (JP0 to JP9). You could run your cards through SORT, get the substitution done, and feed that file into your e-mail producer.
If you have SyncSORT, and up-to-date, it may also have that. Not sure.
Dave, thank you, it's so close I can smell it. It did toss an error:
IEF032I STEP/GENER0 /STOP 2014274.0901
CPU: 0 HR 00 MIN 00.00 SEC SRB: 0 HR 00 MIN 00.00 SEC
VIRT: 72K SYS: 264K EXT: 8K SYS: 10240K
IEF236I ALLOC. FOR DEVY984Y WRITE2
IGD103I SMS ALLOCATED TO DDNAME SYSEXEC
IEF237I JES2 ALLOCATED TO SYSTSPRT
IGD101I SMS ALLOCATED TO DDNAME (OUTFILE )
DSN (DEV.DATA.PROGRAM.SMTPHDR2 )
STORCLAS (INVTSEQ) MGMTCLAS (EXP006M) DATACLAS (INVTSEQ)
VOL SER NOS= APDI10
IRX0110I The REXX exec cannot be interpreted.
IRX0112I The REXX exec cannot be loaded.
IEF142I DEVY984Y WRITE2 - STEP WAS EXECUTED - COND CODE 0020
IGD106I SYS14274.T090149.RA000.DEVY984Y.TEMP0.H05 PASSED, DDNAME=SYSEXEC
IEF285I DEVY984.DEVY984Y.J0082611.D0000109.? SYSOUT
IGD104I DEV.DATA.PROGRAM.SMTPHDR2 RETAINED, DDNAME=OUTFILE
But I noticed that the SMTPHDR2 was created, it's just empty. Is it possible that the REXX error is due to the step being contained within the EZACFSM1 stuff or did I screw something up I failed to see? I love the elegance in this though, let's hope it's a simple tweak...
Joined: 14 Mar 2007 Posts: 8657 Location: Back in jolly old England
I think that the /* REXX */ is missing. Also, can't remember for sure but I know that there are some strange limitations when using IRXJCL so recommend IKJEFT01 instead which gives you full TSO functionality.