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
 

 

Unsigned Positive to Signed Positive conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Unsigned Positive to Signed Positive conversion
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10277
Location: italy

PostPosted: Tue Aug 25, 2009 4:19 pm    Post subject: Reply to: Unsigned Positive to Signed Positive conversion
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
http://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    Post subject:
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    Post subject:
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: 2284
Location: @my desk

PostPosted: Tue Aug 25, 2009 7:07 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Aug 25, 2009 10:15 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Aug 25, 2009 10:45 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Aug 25, 2009 11:24 pm    Post subject:
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    Post subject:
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    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 File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts changing z/os unicode conversion service meykh2014 All Other Mainframe Topics 0 Tue Jul 12, 2016 10:49 am


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