Page 1 of 1

String Search

PostPosted: Tue Feb 05, 2013 9:36 pm
by Vineet
Hi All,

I am having a seqential file having LRECL=80 & RECFM=FB. My requirement is, If starting from position 1, Length = 3, I am having Char. "EOF" I need to set the return code = 4. How can I do this using SORT.

Thanks.

Re: String Search

PostPosted: Tue Feb 05, 2013 9:56 pm
by steve-myers
Any record, first record, last record????

Re: String Search

PostPosted: Tue Feb 05, 2013 9:59 pm
by Vineet
Well we can san Only 1 Record in the File & Having 3 Char starting from Position 1 & Length = 3 as "EOF".

Rgd's

Re: String Search

PostPosted: Tue Feb 05, 2013 10:46 pm
by enrico-sorichetti
search the manuals and the forums for the use of the NULLOUT clause

Re: String Search

PostPosted: Tue Feb 05, 2013 10:50 pm
by skolusu
Vineet,

It would be nice if you can post a feed back for the prior solutions you got. You ask a question receive a solution and then disappear until you have a new question. How hard is it to just provide feedback if the solution worked or not?

Any way here is the solution you looking for. Use the following DFSORT/ICETOOL JCL which will give you the desired results
//STEP0100 EXEC PGM=ICETOOL               
//TOOLMSG  DD SYSOUT=*                   
//DFSMSG   DD SYSOUT=*                   
//IN       DD *                           
BLAH                                     
BLUE                                     
EOF                                       
RED                                       
GREEN     
EOF                               
//OUT      DD SYSOUT=*                   
//TOOLIN   DD *                           
  COUNT FROM(IN) HIGHER(0) RC4 USING(CTL1)
//CTL1CNTL DD *                           
  INCLUDE COND=(1,3,CH,EQ,C'EOF')   
//*

Re: String Search

PostPosted: Tue Feb 05, 2013 11:29 pm
by Vineet
Thanks SKOLUSU, it worked me.

Rgd's