View previous topic :: View next topic
|
Author |
Message |
nobin
New User
Joined: 21 Nov 2007 Posts: 9 Location: India
|
|
|
|
Hi,
I need to update a s9(3) comp-3 field to s9(4) comp field in file using DFSORT. The record length is 240 bytes and the field starts from 48 offset. The file is a PS file.
I tried using the below sort card but the sign is not coming in ouput. I tried using EDIT and SIGN but it is giving syntax error. Can we use EDIT along with binary field?
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,47,48:48,2,PD,TO=BI,LENGTH=2,50:50,191)
INCLUDE COND=(12,4,ZD,NE,0000)
/*
|
Also can I use the same PS file as SORTIN and SORTOUT? Please guide me here |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Nobin,
Quote: |
Also can I use the same PS file as SORTIN and SORTOUT? |
You can, but not recommended. |
|
Back to top |
|
|
nobin
New User
Joined: 21 Nov 2007 Posts: 9 Location: India
|
|
|
|
Hi,
If i use a seperate SORTOUT file can I do the convertion? How can I handle the sign byte in sortcard |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I tried using the below sort card but the sign is not coming in ouput. |
BI is unsigned binary, so there is no sign. FI is fixed-point with a sign. For example, an FI value of -1 is X'FFFF' whereas -1 cannot be represented by BI (a BI value of X'FFFF' is 65535). If you want to convert from PD to FI, you can use TO=FI.
Quote: |
can I use the same PS file as SORTIN and SORTOUT? |
You can't do that for a COPY operation. You must use a different data set for SORTOUT. |
|
Back to top |
|
|
nobin
New User
Joined: 21 Nov 2007 Posts: 9 Location: India
|
|
|
|
Hi Frank,
Thanks a lot. It worked using FI.
Thanks
Nobin |
|
Back to top |
|
|
|