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
 

 

How to insert Binary zeroes

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

New User


Joined: 27 Apr 2009
Posts: 26
Location: addison

PostPosted: Wed Jul 22, 2009 1:32 pm    Post subject: How to insert Binary zeroes
Reply with quote

Hi,

I need to insert binary 90 at the beginning of the record and start inserting SORTIN record from 3rd byte. Can you please help me.

I am trying below card. But its not working.
sort fields=copy
outrec=(x'5A',3:1,5)
Here 1st value in o/p should be binary 90 occupying 2 bytes.

Thanks,
Chandramouli
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Jul 22, 2009 2:31 pm    Post subject:
Reply with quote

Hi,

what do you mean by its not working, you need to do a little better in explaining this.

Also X'5A' equates to 1 byte

Gerry
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 22, 2009 9:01 pm    Post subject:
Reply with quote

Chandramouli,

It's "not working" because you're using the wrong syntax. Here's the correct DFSORT syntax:

Code:

  SORT FIELDS=COPY               
  OUTREC BUILD=(X'005A',3:1,5)   


Alternatively, you can use this syntax:

Code:

  SORT FIELDS=COPY                           
  OUTREC BUILD=(+90,TO=BI,LENGTH=2,3:1,5)   
Back to top
View user's profile Send private message
chandramouliravi

New User


Joined: 27 Apr 2009
Posts: 26
Location: addison

PostPosted: Thu Jul 23, 2009 8:17 pm    Post subject:
Reply with quote

Hi Frank,

You are right. '005A' is the one i need to use. Its wokring.
Thanks for the alternate approach suggested too.
We need not worry about hex equivalent if we use second approach.

My inexperience on "How comp types are stored internally
has caused this error".


Thanks,
Chandramouli
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 Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
No new posts How do I right justify a string in an... rakesh17684 DB2 1 Wed Jun 08, 2016 8:01 pm
No new posts insert the same records but chancing ... danylele74 DB2 6 Mon May 02, 2016 7:22 pm


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