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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm


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