IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What is wrong with this FINDREP ?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
AJAYREDDY

New User


Joined: 17 Feb 2007
Posts: 52
Location: USA

PostPosted: Wed Jan 26, 2011 12:49 am
Reply with quote

I am using below sort parameters in Syncsort to replace characters/spaces with Zeros anywhere from position 223 length 5 inside 404 FB file.

First I am trying to replace 'L' with Zeros but it is not working. JCL return code is zero, but the output file is having same value '00L00' as Input file.

//SYSIN DD *
SORT FIELDS=COPY
INREC FINDREP=(STARTPOS=223,ENDPOS=5,IN=C'L',OUT=C'0')
/*

If this works I am planning to put all the alphabets in IN parameter and try. If anyone has simplest way to do this please let me know.

Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 26, 2011 12:53 am
Reply with quote

Helllo,

Why is the ending position less than the starting position?
Back to top
View user's profile Send private message
AJAYREDDY

New User


Joined: 17 Feb 2007
Posts: 52
Location: USA

PostPosted: Wed Jan 26, 2011 1:16 am
Reply with quote

Sorry, I overlooked into it. I was assuming it is the length parameter from Starting Postion. I changed it to 227 and it worked.


//SYSIN DD *
SORT FIELDS=COPY
INREC FINDREP=(STARTPOS=223,ENDPOS=227,IN=C'L',OUT=C'0')
/*

I replaced entire Sort card with below and it worked for all other records.

SORT FIELDS=COPY
INREC FINDREP=(STARTPOS=223,ENDPOS=227,
IN=(C'A',C'B',C'C',C'D',C'E',C'F',C'G',C'H',C'I',
C'J',C'K',C'L',C'M',C'N',C'O',C'P',C'Q',C'R',
C'S',C'T',C'U',C'V',C'W',C'X',C'Y',C'Z',

C'a',C'b',C'c',C'd',C'e',C'f',C'g',C'h',C'i',
C'j',C'k',C'l',C'm',C'n',C'o',C'p',C'q',C'r',
C's',C't',C'u',C'v',C'w',C'x',C'y',C'z',

C'~',C'`',C'!',C'@',C'#',C'$',C'%',C'¢',C'&',
C'*',C'(',C')',C'_',C'-',C'+',C'=',C'{',C'}',
C'¬',C'¦',C'|',C'\',C':',C';',C'"',C'?',C'/',
C'>',C'<',C'.',C',',C'[',C']',C' ',C''''),
OUT=C'0')

Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 26, 2011 1:21 am
Reply with quote

Good to hear it is working - thank you for posting your solution icon_smile.gif

d
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jan 26, 2011 1:32 pm
Reply with quote

Please DO NOT post the exact same question twice on this forum.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
This topic is locked: you cannot edit posts or make replies. Findrep - an identifier to mark the a... SYNCSORT 17
No new posts Using REXX to access SDSF; What am I ... CLIST & REXX 39
No new posts Outrec IFTHEN builds data in wrong po... DFSORT/ICETOOL 6
Search our Forums:

Back to Top