IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to insert Binary zeroes


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 1702
Location: Australia

PostPosted: Wed Jul 22, 2009 2:31 pm
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jul 22, 2009 9:01 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Remove leading zeroes SYNCSORT 4
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts Identify Program Insert DB2 7
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
Search our Forums:

Back to Top