Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us