Replace low value with space at 587th position !!



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Replace low value with space at 587th position !!

Postby athul009 » Mon Jan 26, 2009 9:49 pm

I want to replace low value with space at 587th position and replace X'2C' with space at 588th position !!
By going through some examples on web search , I think of two methods:

1)
//H081107 EXEC PGM=ICEMAN
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//*
//SORTIN DD DSN=DMET.A0RD7102.FTP.D0120.KEEP12,DISP=SHR
//SORTOUT DD DSN=DMET.A0RD7102.FTP.D0120.KEEP12.CLEAN,
// DISP=(,CATLG,DELETE),
// UNIT=3390,SPACE=(CYL,(200,100),RLSE)
//*
//SYSIN DD *
OPTION COPY
INREC FIELDS=(1:1,586,CHANGE=(587,X'00',X'40',588,X'2C',X'00'))
//*

I am getting the following Error in Spool :
ICEM_CHANGE_error.jpg


2) While trying for another option using FINDREP :

//SYSIN DD *
OPTION COPY
INREC FINDREP=(STARTPOS=587,ENDPOS=588,IN=(X'00',X'2C'),OUT=X'40'))
//*

I am getting the following error in SYSOUT Spool :
ICEM_FINDREP_error.jpg


Please let me know, what might be the problem in any Or both the examples.
Thanks a lot!
You do not have the required permissions to view the files attached to this post.
athul009
 
Posts: 3
Joined: Fri Jan 16, 2009 4:51 am
Has thanked: 0 time
Been thanked: 0 time

Re: Replace low value with space at 587th position !!

 

Re: Replace low value with space at 587th position !!

Postby Frank Yaeger » Tue Jan 27, 2009 1:53 am

Your first attempt is wrong because you seem to have pulled the syntax out of a hat. It has no relation to the actual correct syntax.
The correct DFSORT statements would be:

  OPTION COPY                                                     
  INREC OVERLAY=(587:587,1,CHANGE=(1,X'00',X'40'),NOMATCH=(587,1),
    588,1,CHANGE=(1,X'2C',X'40'),NOMATCH=(588,1))                 


Here's another way to do the same thing:

  OPTION COPY                                                   
  INREC IFTHEN=(WHEN=(587,1,BI,EQ,X'00'),OVERLAY=(587:X'40'),   
    HIT=NEXT),                                                   
   IFTHEN=(WHEN=(588,1,BI,EQ,X'2C'),OVERLAY=(588:X'40'))         


Your second attempt is closer - you just need to remove the last right paren. But you need z/OS DFSORT PTF UK90013 (July, 2008) to use FINDREP and you don't have that PTF installed. Ask your System Programmer to install it (it's free).

In the future, please don't use screenshots as they are difficult to view and impossible to copy/paste. Just use plain inline text.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post