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
 

 

Syntax for processing Binary fields using INREC

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

New User


Joined: 02 Feb 2006
Posts: 2

PostPosted: Fri Feb 09, 2007 12:17 pm    Post subject: Syntax for processing Binary fields using INREC
Reply with quote

HI,

I have a requirement that in a file of 283 length if value other than 41 in the place of (282,2), i have to replace it with 41.
The field in the position 282 of length 2 bytes is Binary.
I hope I can do this with INREC, IFTHEN and BUILD.
But I need the syntax for processing Binary fields.



Thanks & Regards,
Hema.
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Feb 09, 2007 3:11 pm    Post subject:
Reply with quote

If the value is not 41 then replace it with 41? How about if the value is 41, replace it with 41? How about just plug 41 regardless of what is there?
Your requirement is very simple, just a copy with an outrec something like 1:1,281,282:'41',2,BI - but that is just from a faulty memory. Why don't you look up the actual format in your sort manual?
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: Fri Feb 09, 2007 9:28 pm    Post subject:
Reply with quote

Well, like William says, you could simplify this to always put +41 in binary into 282-283 with these DFSORT statements:

Code:

   OPTION COPY
   INREC OVERLAY=(282:+41,TO=BI,LENGTH=2)


But if you really want to do the test, you can use these statements:

Code:

   OPTION COPY
   INREC IFTHEN=(WHEN=(282,2,BI,NE,+41),
      OVERLAY=(282:+41,TO=BI,LENGTH=2))
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 Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Run stats processing on zIIP Engine Virendra Shambharkar DB2 9 Fri Oct 14, 2016 10:24 am
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm


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