Page 1 of 1

Conditional Copy Using IEBGENER

PostPosted: Mon Sep 28, 2015 2:37 pm
by nkulkarni
Hi,

I'm using an IEBGENER step to copy a input file to output file.

There are some lines in the input files which I want to skip and copy only required lines to output file.

For example, input file has some lines starting with word "READY" and some with "#string", I would like to skip such lines and copy rest to output file

Could anyone please help me with this task?

NK

Re: Conditional Copy Using IEBGENER

PostPosted: Mon Sep 28, 2015 3:04 pm
by Aki88
Hello NKulkarni,

Fwiw, the requested task can very easily be accomplished by using SORT (DFSORT/SYNCSORT - depending on your site).
If the position of the characters you've mentioned is fixed, then all it'd take is a simple 'OMIT COND' to do the trick for you.

You can look at the manuals sections of the forum, or search the forum for 'OMIT COND', there are numerous examples that demostrate the usage of the same.

Hope this helps.

Re: Conditional Copy Using IEBGENER

PostPosted: Mon Sep 28, 2015 3:30 pm
by nkulkarni
Hi Aki88,

Thank you for your response.

I'm using that IEBGENER step to send an Email via SMTP (JCL is as below)

//EMAILRPT EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=ABC.DEF.GHI
//SYSUT2 DD SYSOUT=(B,SMTP)
//*

I was wondering if there is any technique which allows me to use the IENGENER - SMTP combination and extract the required data from input file without using the DFSORT/SYNCSORT...

NK

Re: Conditional Copy Using IEBGENER

PostPosted: Mon Sep 28, 2015 3:38 pm
by Aki88
Hello,

Why not use a SORT step to filter data, and subsequently feed the dataset to IEBGENER for transmission in the next step?

Au contraire, you could route your SORTOUT dataset to SMTP in the similar fashion as you've done in case of IEBGENER; would suggest you test this solution before using it, so as to check if it suits your needs.

Hope this helps.

Re: Conditional Copy Using IEBGENER

PostPosted: Mon Sep 28, 2015 3:48 pm
by BillyBoyo
Aki88 is correct. Some installations "alias" IEBGENER to SORT anyway. There is no problem with using a SORT COPY and doing you selection with INCLUDE/OMIT COND or INCLUDE=/OMIT= (on OUTFIL). Just send the SORTOUT (or an OUTFIL of your choice) to the "email" sysout characteristics.

Re: Conditional Copy Using IEBGENER

PostPosted: Mon Sep 28, 2015 4:13 pm
by nkulkarni
Hi Aki88 & BillyBoyo,

Thank you very much for your helpful answers, I tried using SORT in place of IEBGENER and it worked perfectly fine.

Thank you again...

NK

Re: Conditional Copy Using IEBGENER

PostPosted: Wed Oct 07, 2015 7:14 pm
by NicC
You could always read the IEBGENER manual and see what its edit facilities can do for you although it is a long time since I looked at them and I suspect you cannot do what you want with IEBGENER.

Re: Conditional Copy Using IEBGENER

PostPosted: Thu Oct 08, 2015 6:31 pm
by nkulkarni
Hi NicC,

Thank you for your response