Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
replacing a num/alphanumeric data using OVERLAY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sumit_mainframe123

New User


Joined: 06 Jul 2010
Posts: 4
Location: pune

PostPosted: Wed Jul 07, 2010 6:34 pm    Post subject: replacing a num/alphanumeric data using OVERLAY
Reply with quote

Hi all,

I want to replace a existing numeric/alphanumeric data in a file. say replace 44 by 88.
I am using the below code:

SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(1,2,ZD,EQ,'44')
OVERLAY=(1:'88'))

but there seems to be some problem with the syntax.
Kindly help me to get the solution.

rgds
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jul 07, 2010 6:48 pm    Post subject:
Reply with quote

Found and adapted from a simple forum search.
Code:
 SORT FIELDS=COPY                                         
 OUTREC IFTHEN=(WHEN=(1,2,CH,EQ,C'44'),OVERLAY=(1:C'88'))
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 Jul 07, 2010 10:03 pm    Post subject:
Reply with quote

sumit_mainframe123,

For WHEN:

If you use ZD format, then you must use a decimal constant:

WHEN=(1,2,ZD,EQ,44)

If you want to use a character constant, then you must use CH format:

WHEN=(1,2,CH,EQ,C'44')

You cannot mix the two.

For OVERLAY, you can use a decimal constant or a character constant:

OVERLAY=(1:C'88')

or

OVERLAY=(1:+88,EDIT=(TT))

You can't just make up your own syntax and expect it to work. You have to look up the correct syntax in the DFSORT books which you can access from:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
sumit_mainframe123

New User


Joined: 06 Jul 2010
Posts: 4
Location: pune

PostPosted: Thu Jul 08, 2010 10:17 am    Post subject: Reply to: replacing a num/alphanumeric data using OVERLAY
Reply with quote

Thanks alot for helping me!!!!

I'll keep the suggestions in my mind.
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us