Conditional Copy Using IEBGENER



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Conditional Copy Using IEBGENER

Postby nkulkarni » Mon Sep 28, 2015 2:37 pm

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
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Conditional Copy Using IEBGENER

 

Re: Conditional Copy Using IEBGENER

Postby Aki88 » Mon Sep 28, 2015 3:04 pm

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.
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: Conditional Copy Using IEBGENER

Postby nkulkarni » Mon Sep 28, 2015 3:30 pm

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
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Conditional Copy Using IEBGENER

Postby Aki88 » Mon Sep 28, 2015 3:38 pm

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.

These users thanked the author Aki88 for the post:
nkulkarni (Thu Oct 08, 2015 8:09 pm)
Aki88
 
Posts: 371
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 35 times

Re: Conditional Copy Using IEBGENER

Postby BillyBoyo » Mon Sep 28, 2015 3:48 pm

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.

These users thanked the author BillyBoyo for the post:
nkulkarni (Thu Oct 08, 2015 8:09 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Conditional Copy Using IEBGENER

Postby nkulkarni » Mon Sep 28, 2015 4:13 pm

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
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Conditional Copy Using IEBGENER

Postby NicC » Wed Oct 07, 2015 7:14 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Conditional Copy Using IEBGENER

Postby nkulkarni » Thu Oct 08, 2015 6:31 pm

Hi NicC,

Thank you for your response
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post