Page 2 of 2

Re: String manupulation in JCL

PostPosted: Sun Mar 10, 2013 2:02 pm
by nikesh_rai
Thanks Billy, Kolusu and all, after some minor modification.. the code is working as expected.. thanks again to all of you.. :)

Re: String manupulation in JCL

PostPosted: Mon Mar 11, 2013 3:51 am
by dick scherrer
Hello,

If you post the "minor modifications", you may help someone else later . . . ;)

Re: String manupulation in JCL

PostPosted: Mon Mar 11, 2013 3:39 pm
by nikesh_rai
Here is the code for reference:

OUTREC IFTHEN=(WHEN=(8,2,FS,EQ,NUM,AND,10,1,CH,EQ,C' '),                           
               PARSE=(%00=(ABSPOS=08,STARTAT=C' W',                   
                           ENDBEFR=C'-',FIXLEN=2),                   
                      %01=(ENDBEFR=C'-',FIXLEN=1),                   
                      %02=(ENDBEFR=C'-',FIXLEN=1),                   
                      %03=(STARTAT=C'P ',ENDAT=C'.',FIXLEN=50)),   
               BUILD=(1,10,11:%00,C'-',%01,C'-',%02,C' ',%03)),


This modification is only for the internal purpose.. otherwise everything I kept same.. :)

Re: String manupulation in JCL

PostPosted: Mon Mar 11, 2013 9:26 pm
by skolusu
nikesh_rai wrote:This modification is only for the internal purpose.. otherwise everything I kept same.. :)


Nikesh_rai,

I am not sure as to why you had abspos=8 when your IFTHEN statement is checking for numerics in position 8. You are also writing the first 10 bytes as is , why do you want ABSPOS to start at 8?

I am guessing that you are using Syncsort and that is the reason you moved the PARSE from INREC to OUTREC as it complains about Potential inefficiency? If you are indeed using syncsort, please post your questions in the syncsort forum.