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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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