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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: converting s9(3) comp-3 field to s9(4) comp
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: 1439
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 3:49 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Nov 21, 2007 10:47 pm    Post subject:
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    Post subject:
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    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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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