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 Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


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