View previous topic :: View next topic
|
Author |
Message |
pnsnaresh
New User
Joined: 16 May 2006 Posts: 7 Location: pune
|
|
|
|
HI all,
I am using the below sort, job completes sucess full , only one filed is replaced '31.01.2012' the other field are not replaced. tried sevral options but not got thru.
Code: |
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(5,10,CH,EQ,C'29.02.2012'),
OVERLAY=(5:C'31.01.2012')),
IFTHEN=(WHEN=(56,2,CH,EQ,C'02'),
OVERLAY=(56:C'01')),
IFTHEN=(WHEN=(58,4,BI,EQ,20120309),
OVERLAY=(58:+20120204,TO=BI,LENGTH=4))
/*
/*
|
Please suggest.
My requiremnt is to replace the valuse on three fileds on evrey reocd
Code: |
10 DATE 29.02.2012 POSTION 5
10 MONTH 02 POSTION 56
10 CNTL-NO 20120309 POSTION 58 |
Thanks,
Naresh |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
hit=next |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Why is this an "interview question"? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
as said over and over ...
DO NOT POST SCREENSHOTS
a plain text cut and paste with the code tags is more than enough !
the screen shot was deleted. |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi Naresh,
Please use below mentioned sort card.
Code: |
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(5,10,CH,EQ,C'29.02.2012'),
OVERLAY=(5:C'31.01.2012'),HIT=NEXT),
IFTHEN=(WHEN=(56,2,CH,EQ,C'02'),
OVERLAY=(56:C'01'),HIT=NEXT),
IFTHEN=(WHEN=(58,4,BI,EQ,20120309),
OVERLAY=(58:+20120204,TO=BI,LENGTH=4)) |
Input:
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
ABCD29.02.2012 0220120309 |
Output:
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
ABCD31.01.2012 0120120309 |
|
|
Back to top |
|
|
pnsnaresh
New User
Joined: 16 May 2006 Posts: 7 Location: pune
|
|
|
|
Thanks parsad will check on this tomorrow and will let you know.
Naresh. |
|
Back to top |
|
|
pnsnaresh
New User
Joined: 16 May 2006 Posts: 7 Location: pune
|
|
|
|
I Just tested this . I could replace the data now.
Thanks a lot saiprsad...you have solved my prod issue.
Thanks team.
Thanks & Regards,
Naresh.P |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Not a word for dbz, who gave you the solution seven minutes after you posed the question?
How could this be a "prod" issue? Can't have got through testing, as it plain didn't work.
Have you looked in your manual now to see why the HIT=NEXT fixed the problem?
For the future, note that DFSORT questions go in the DFSORT forum, Syncsort questions in the JCL forum. Interview Questions go in this forum. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Not a word for dbz, who gave you the solution seven minutes after you posed the question? |
Bill, shame on You
after more than 2000 posts You haven' t learned yet that people around here do not give a f**k about suggestions and hints and want ready to run solutions
( for some of them it is even too much work to have to retype them ) |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It's like a mailshot. I don't expect 100% replies, nor 100% conversion of replies :-) |
|
Back to top |
|
|
|