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

sort using change in outrec


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vrexy

New User


Joined: 19 May 2005
Posts: 7
Location: bangalore

PostPosted: Wed Feb 01, 2006 8:21 pm
Reply with quote

Hi,

I have a file of length 550 and need to replace 220th position which is a character with numeric .I used below code to execute,but its throwing error.
Code:

SORT FIELDS=COPY
OUTFIL OUTREC=(550,1,                     
                  CHANGE=(220,C'M',C'1', 
                              C'W',C'2', 
                              C'S',C'3', 
                              C'D',C'4'),
                       NOMATCH=(C'G'))   


I tested for changing numeric to numeric by specifying ''C''and its working fine.

EX: C'1',C'0'

I think the problem is with data type(C OR X OR PD..) which we need to declare correctly!

Can any body throw some light on the above issue to resolve?

Cheers,
rexy.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 01, 2006 9:47 pm
Reply with quote

Quote:
I used below code to execute,but its throwing error.


When you say something like this, you need to show the exact error message you received.

In this case, given that your syntax is wrong in several ways, you could have gotten any one of a number of errors. You have:

Code:

   OUTFIL OUTREC=(550,1,                     
                  CHANGE=(220,C'M',C'1', 
                              C'W',C'2', 
                              C'S',C'3', 
                              C'D',C'4'),
                       NOMATCH=(C'G'))   


What this syntax says is that if the byte at 550 is 'M', change 220 bytes starting at 550 to '1', etc. Obviously, that's not what you want to do.

If you want to replace the byte at 220, you could use this syntax with DFSORT:

Code:

    OUTFIL OVERLAY=(220:220,1,
                  CHANGE=(1,C'M',C'1', 
                              C'W',C'2', 
                              C'S',C'3', 
                              C'D',C'4'),
                       NOMATCH=(C'G'))   
Back to top
View user's profile Send private message
vrexy

New User


Joined: 19 May 2005
Posts: 7
Location: bangalore

PostPosted: Thu Feb 02, 2006 10:31 am
Reply with quote

Quote:
If you want to replace the byte at 220, you could use this syntax with DFSORT:

Code:

    OUTFIL OVERLAY=(220:220,1,
                  CHANGE=(1,C'M',C'1', 
                              C'W',C'2', 
                              C'S',C'3', 
                              C'D',C'4'),
                       NOMATCH=(C'G'))   


Hi,

The above code is also throwing SYNTAX error.Is the above code supprots for SYNCSORT??

Cheers,
rexy.
Back to top
View user's profile Send private message
vrexy

New User


Joined: 19 May 2005
Posts: 7
Location: bangalore

PostPosted: Thu Feb 02, 2006 4:15 pm
Reply with quote

Hi,

I did it thru FILE-AID replace and its working fine. Thankyou for promt reply.

$$DD01 COPY REPL=(220,EQ,C'M',220,C'1'),
REPL=(220,EQ,C'H',220,C'2'),
REPL=(220,EQ,C'W',220,C'3'),
REPL=(220,EQ,C'S',220,C'4'),
REPL=(220,EQ,C'D',220,C'5')

Cheers,
rexy.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Feb 02, 2006 10:25 pm
Reply with quote

Quote:
The above code is also throwing SYNTAX error.Is the above code supprots for SYNCSORT??


The code works fine with DFSORT. It does NOT work with Syncsort because Syncsort does not support OVERLAY.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 5
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top