View previous topic :: View next topic
|
Author |
Message |
chandramouliravi
New User
Joined: 27 Apr 2009 Posts: 26 Location: addison
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
chandramouliravi
New User
Joined: 27 Apr 2009 Posts: 26 Location: addison
|
|
|
|
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 |
|
|
|