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

converting s9(3) comp-3 field to s9(4) comp


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nobin

New User


Joined: 21 Nov 2007
Posts: 9
Location: India

PostPosted: Wed Nov 21, 2007 3:48 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 3:49 pm
Reply with quote

Nobin,

Quote:
Also can I use the same PS file as SORTIN and SORTOUT?

You can, but not recommended.
Back to top
View user's profile Send private message
nobin

New User


Joined: 21 Nov 2007
Posts: 9
Location: India

PostPosted: Wed Nov 21, 2007 3:52 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Nov 21, 2007 10:47 pm
Reply with quote

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
View user's profile Send private message
nobin

New User


Joined: 21 Nov 2007
Posts: 9
Location: India

PostPosted: Thu Nov 22, 2007 4:51 pm
Reply with quote

Hi Frank,

Thanks a lot. It worked using FI.

Thanks
Nobin
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top