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

converting +ve to -ve and vice versa for non zero values


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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 15, 2011 12:38 am
Reply with quote

just play around with something like

input

Code:
 ****** ***************************** Top of Data ******************************
 000001                                                                         
        000000004444444444444444444444444444444444444444444444444444444444444444
        000C000C0000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000002                                                                         
        000000004444444444444444444444444444444444444444444444444444444444444444
        000C000D0000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000003                                                                         
        000000004444444444444444444444444444444444444444444444444444444444444444
        000C000F0000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 ****** **************************** Bottom of Data ****************************


jcl1
Code:
 ****** ***************************** Top of Data ******************************
 000001 //ENRICO1  JOB NOTIFY=&SYSUID,                                         
 000002 //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=H                       
 000003 //*                                                                     
 000004 //ICE     EXEC PGM=SORT                                                 
 000005 //SYSOUT    DD SYSOUT=*                                                 
 000006 //SYSPRINT  DD SYSOUT=*                                                 
 000007 //SORTIN    DD DISP=SHR,DSN=ENRICO.TEST.PS1                             
 000008 //SORTOUT   DD DISP=SHR,DSN=ENRICO.TEST.PS2                             
 000009 //SYSIN     DD *                                                       
 000010   OPTION NOSZERO                                                       
 000011   SORT FIELDS=COPY                                                     
 000012   INCLUDE COND=(1,4,PD,EQ,5,4,PD)                                       
 000013 //                                                                     
 ****** **************************** Bottom of Data ****************************


result
Code:
 ****** ***************************** Top of Data ******************************
 000001                                                                         
        000000004444444444444444444444444444444444444444444444444444444444444444
        000C000C0000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000002                                                                         
        000000004444444444444444444444444444444444444444444444444444444444444444
        000C000D0000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000003                                                                         
        000000004444444444444444444444444444444444444444444444444444444444444444
        000C000F0000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 ****** **************************** Bottom of Data ****************************


jcl2
Code:
 ****** ***************************** Top of Data ******************************
 000001 //ENRICO1  JOB NOTIFY=&SYSUID,                                         
 000002 //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=H                       
 000003 //*                                                                     
 000004 //ICE     EXEC PGM=SORT                                                 
 000005 //SYSOUT    DD SYSOUT=*                                                 
 000006 //SYSPRINT  DD SYSOUT=*                                                 
 000007 //SORTIN    DD DISP=SHR,DSN=ENRICO.TEST.PS1                             
 000008 //SORTOUT   DD DISP=SHR,DSN=ENRICO.TEST.PS2                             
 000009 //SYSIN     DD *                                                       
 000010   SORT FIELDS=COPY                                                     
 000011   INCLUDE COND=(1,4,PD,EQ,5,4,PD)                                       
 000012 //                                                                     
 ****** **************************** Bottom of Data ****************************

result
Code:
  ****** ***************************** Top of Data ******************************
 000001                                                                         
        000000004444444444444444444444444444444444444444444444444444444444444444
        000C000C0000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 000002                                                                         
        000000004444444444444444444444444444444444444444444444444444444444444444
        000C000F0000000000000000000000000000000000000000000000000000000000000000
 ------------------------------------------------------------------------------
 ****** **************************** Bottom of Data ****************************


the test seems simple enough to understand the NOSZERO vs. the SZERO behavior
Back to top
View user's profile Send private message
anatol

Active User


Joined: 20 May 2010
Posts: 121
Location: canada

PostPosted: Tue Nov 15, 2011 12:40 am
Reply with quote

yes, you are right... the 2 files created for test Enterprize PLI migration... one created by PLI MVS, other EPLI ... the logic is the same, the result is : +0 -0 differencies
Back to top
View user's profile Send private message
anatol

Active User


Joined: 20 May 2010
Posts: 121
Location: canada

PostPosted: Tue Nov 15, 2011 12:45 am
Reply with quote

Thank you , enrico-sorichetti ... I knew that... but was hope that I can convert -0 to +0 in whatever position.... sorry, guys... I think we should close the discussion - thank you all
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Nov 15, 2011 12:49 am
Reply with quote

Just to confirm, then, the original is the PL/I MVS with -ve zeros, and the +ve zeros are the Enterprise PL/I?

And you already checked the changes section of the manual or the migration guide to know why this is happening, I assume.

If so, maybe give it a shot with the FINDREP you have, just to get the comparison going to check for any other differences between the datasets.

I'd still prefer to do it field-by-field after that, but that's me :-)

EDIT: Sorry, I was till typing before seeing you closing it down :-)

I don't understand the 'vice versa' or your subject that I've just noticed. That would be wrong, I think. As I undertsand it, results of some calcuations in PL/1 (like Cobol) will no longer produce -ve zero, but instead only +ve zero. It should not be the case (I am open to correction from PL/I people) that -ve zero can be produced in different circumstances than previously.

EDIT2: I've just realised after following Frank's message below that you actually "tailgated" an old topic instead of starting a new one. You were not responsible for the subject, so ignore most of the first EDIT.
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 Nov 15, 2011 12:54 am
Reply with quote

anatol,

With all the "comments", I've lost track of what your question is.

Quote:
I have oposite request. I have +0 or -0 in unknown position in the file ... I need to convert it to +0 value for all...


The only possibility for changing something in an unknown position is to use FINDREP, e.g. change X'D0' to X'C0' in any byte. But that will only work if the character you're changing is ONLY used for -0 and NOT for anything else. Otherwise, you need to know the position of the field in order to convert it.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Converting fixed length file to excel... IBM Tools 7
Search our Forums:

Back to Top