Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

sort using change in outrec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: sort using change in outrec
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 Moderator


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

PostPosted: Wed Feb 01, 2006 9:47 pm    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Feb 02, 2006 10:25 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us