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

Unsigned Positive to Signed Positive conversion


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

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Aug 25, 2009 4:12 pm
Reply with quote

I have a input file which has a 9(3) COMP-3 field. As this is an unsigned variable, it holds values like X'015F', X'034F' etc.. with the last nibble holding F to denote unsigned positive.

My output file has the same field as S9(3) COMP-3. As this is a signed variable, I want the original values to be changed as X'015C', X'034C' etc.. with the last nibble holding C to denote signed positive

I tried issuing INREC FIELDS=(1,2,BI,TO=FI).. But that did not change the last nibble from 'F' to 'C'

One round about way I could think was using CHANGE/NOMATCH to do the changes. But I really feel there might be a simpler way to do the same.

Can anyone advice me on this pls ???
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Aug 25, 2009 4:19 pm
Reply with quote

Quote:
with the last nibble holding F to denote unsigned positive.
12.gif
I wonder how an unsigned negative might be represented

read the pop about packed number representation
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DZ9ZR003/CCONTENTS?SHELF=DZ9ZBK03&DN=SA22-7832-03&DT=20040504121320
Back to top
View user's profile Send private message
milind suman
Warnings : 1

New User


Joined: 19 Aug 2009
Posts: 55
Location: Pune

PostPosted: Tue Aug 25, 2009 4:53 pm
Reply with quote

Why do u want to change 'F' to 'C' ..doesnt 'F' look better .
u simply want to change postive to postive ..think more abt ur reqrmnt
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Aug 25, 2009 5:06 pm
Reply with quote

@Milind - Will describe u in short what I am trying to do..

I have a cobol module which actually acts on the input file i specified. The input copybook has var1 defined as 9(3) COMP-3 and the output copybook has var2 defined as S9(3) COMP-3. When the content of var1 (say x'014F') is moved to var2, the sign nibble gets changed and it becomes x'014C'.

Now, I am trying to enhance the performance of this step by replacing the cobol module with a dfsort as the cobol does not do anything but re organising the input file. As this is for performance reasons, i do not want change in any bit of output data !!!!!!! Hence would want to retain the conversion of 'F' to 'C'
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Aug 25, 2009 7:07 pm
Reply with quote

rockish,

You can give this a try to force a 'C' sign for a 2 byte PD field starting at pos-1.
Code:
//STEP0100 EXEC PGM=SORT                 
//SYSOUT   DD SYSOUT=*                   
//SORTIN   DD DSN= Input file           
//SORTOUT  DD DSN= Output file           
//SYSIN    DD *                         
  SORT FIELDS=COPY                       
  INREC OVERLAY=(1:1,2,PD,PDC)           
/*     
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Aug 25, 2009 9:27 pm
Reply with quote

Hi Arun,

Thanks for your reply.

But I am getting error when I tried the option that you provided me with. I have a doubt. what does PDC mean ?? I tried going through DFSORT Manual also for the same. But could not find anything for it !!!!

Please find my error message below !!!!
I tried this for a 6 byte PD field starting at pos - 35

Code:

            OUTFIL OVERLAY=(35:1,6,PD,PDC)
                                      \   
ICE006A 0 OPERAND DEFINER ERROR
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: Tue Aug 25, 2009 10:15 pm
Reply with quote

PDC means PD with a C sign for positive values.

PDC has been available with DFSORT since April, 2006. The error message indicates your site is very far behind in installing service.

Assuming you are using z/OS DFSORT V1R5, ask your System Programmer to install PTF UK90013 (July, 2008). That will get you up to date with all of the available DFSORT functions.
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Aug 25, 2009 10:28 pm
Reply with quote

Thanks for the response Frank.

I am using DFSORT Release 14.0

Does this release support PDC options ? Or should I upgrade my DFSORT utility to make use of this function ?
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: Tue Aug 25, 2009 10:45 pm
Reply with quote

DFSORT R14 PTF UK90006 (April, 2006) supports PDC.

Quote:
should I upgrade my DFSORT utility to make use of this function ?


What release of z/OS are you runinng (z/OS 1.4?).
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Aug 25, 2009 11:16 pm
Reply with quote

yeah.. I am using Z/oS 1.4

I will check with my System programmer to install DFSORT R14 PTF UK90006.

Thanks a lot Frank..
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: Tue Aug 25, 2009 11:24 pm
Reply with quote

Note that z/OS 1.4 is out of service. Your site really should upgrade to a supported z/OS release. Note that many DFSORT/ICETOOL functions are only available on z/OS 1.5 and above.
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Aug 25, 2009 11:34 pm
Reply with quote

Thanks again for your advice Frank.

I will put forward your suggestion for upgradation :-)
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 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
Search our Forums:

Back to Top