0

I'm trying to send an email using BATCHTMP using the contents of a dataset.

But what happens is it just displays the first row even incomplete.

Here is my step that executes IEBGENER.

Please note that the multiple inputs have different LRECL but it seems to accept LRECL 80 for the output dataset fine.

//STEP202  EXEC    BATCHTMP,COND=(0,NE,STEP020)       
//SYSPRINT DD      SYSOUT=*                           
//SYSABOUT DD      SYSOUT=D                           
//SYSUDUMP DD      SYSOUT=D                           
//SYSOUT   DD      SYSOUT=*                           
//*                                                   
//MAILINPT DD      DSN=SUMFILE,           
//             DISP=SHR                               
//*                                                   
//SYSTSIN  DD      *                                  
OUTLOOK2 MAHEMAIL@MAHEMAIL.com -           
MAINFRAMEDAYCOUNT GAMING SIR                          
//*                                                   
Bill Woodger
  • 12,968
  • 4
  • 38
  • 47
Luigi
  • 439
  • 5
  • 23
  • P.S. I am trying to email the dataset, and it displays the first row only. – Luigi Feb 11 '15 at 01:13
  • Your step executes a PROC, BATCHTMP. Presumably the missing information from the JCL is in that PROC? Can you edit your question and paste file 2 from the spool output from your JOB, which will show the actual JCL statements after the expansion of the PROC? – Bill Woodger Feb 11 '15 at 09:35
  • The JCL is fine. it works fine on other datasets. In this case I tried viewing the SUMFILE by ISPF and I saw it was complete. But when I send it, it seems to stop after the first row. The first row is not even complete. – Luigi Feb 12 '15 at 03:17

1 Answers1

0

Try viewing your dataset and use HEX ON on the command line.

using IEBGENER and SORT sometimes causes a HEX value of 00 inside your dataset. This is unacceptable by outlook but is ok in MAINFRAME. It reads it as a terminating value or EOF/EOL. This is why you can view the dataset but the outlook cannot read it as a whole.

You can try and sort the file again before sending by removing the HEX '00' values and replace it with HEX '40' (a space).

Luigi
  • 439
  • 5
  • 23
  • @Luigi Yeah, I tried that and found a HEX value of '00' in column 43. It is also the length of the sentence in my emails. I corrected this by using a SORT as you suggested and it worked. SORT FIELDS=COPY OUTREC FIELDS=(1,42,44:44,37) Thanks, I hope this helps others. – Luigi Feb 12 '15 at 03:24
  • Sorry, but this is a ridiculous statement: "using IEBGENER and SORT sometimes causes a HEX value of 00 inside your dataset.". Unless the X'00' is already in the data, or unless your SORT control cards *add* the X'00' , there will be no X'00'. How long is the "length of sentence"? Two bytes? What if you get some other one-byte control-code value in one or other byte? Or if you have a line of 256 bytes? Best get rid of the whole field. And edit the information into your answer (with correct details). – Bill Woodger Feb 12 '15 at 07:16
  • Thank you for telling me that. You see when the initial developers created the JCL. It had over a hundred steps with 100 unique programs to go with it. So what you say must be true. But then, where on earth would the HEX'00' come from? A cobol can't do that. It's an unnatural value – Luigi Feb 17 '15 at 22:48
  • 1
    `01 some-name PIC X VALUE LOW-VALUES.` Easy. Lots of other ways as well. COBOL on the Mainframe has no problem with any of the 256 possible bit-values. Another way to likely get it is this: `10 FILLER PIC X.` If that is in the WORKING-STORAGE its most-likely (but not guaranteed) value at run-time is X'00'. If you can't track it down, ask another question including the relevant definitions and procedure code. – Bill Woodger Feb 17 '15 at 23:40
  • OMG, I think you just actually solved that bugging question in my mind! I knew that a HEX'00' was a lower case of a space but didn't know where on earth it came from! By the way I asked the question that I thought was the right question at that time. I really did. And the procedures can't just be copy pasted. It's too long – Luigi Feb 18 '15 at 03:44