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

Change sign of a field


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Sun Jun 17, 2012 5:49 pm
Reply with quote

Hi there,
I have one file that has more than one million records. In this file I have to modify three fields and there is one requirment to change sign of these three fields(make+ve to -ve and -ve to +ve).
Is there any way to do that via JCL or File Aid?
Please advise.
Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Sun Jun 17, 2012 6:09 pm
Reply with quote

Quote:
Is there any way to do that via JCL or File Aid?
JCL -- absolutely not. You've been on this board over 3 years without reading, once, that JCL does nothing but execute programs? If you had asked if SORT could do this, or IEBGENER, or IDCAMS -- those are programs executed by JCL, and it is possible at least one of them could do this. But JCL, by itself? No way.

Furthermore, your post lacks crucial information -- are these three fields that need their sign reversed zoned decimal with an external sign? zoned decimal with internal sign? packed decimal? binary? floating point?
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Mon Jun 18, 2012 12:15 am
Reply with quote

Robert Sample wrote:
Quote:
Is there any way to do that via JCL or File Aid?
JCL -- absolutely not. You've been on this board over 3 years without reading, once, that JCL does nothing but execute programs? If you had asked if SORT could do this, or IEBGENER, or IDCAMS -- those are programs executed by JCL, and it is possible at least one of them could do this. But JCL, by itself? No way.

Furthermore, your post lacks crucial information -- are these three fields that need their sign reversed zoned decimal with an external sign? zoned decimal with internal sign? packed decimal? binary? floating point?


I meant any JCL utility that could do this.

Binary. Please have a look below.
S9(6)V99.
S9(8)V99.
S9(8)V99.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jun 18, 2012 12:22 am
Reply with quote

Quote:
JCL utility

would be something like jclscan, i.e. a utility that does something to jcl.

i'll not comment on the other silliness of your post.
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Mon Jun 18, 2012 1:08 am
Reply with quote

dbzTHEdinosauer wrote:
Quote:
JCL utility

would be something like jclscan, i.e. a utility that does something to jcl.

i'll not comment on the other silliness of your post.


Utility I meant - IDCAMS,IEBGENER etc.

Okay. No probs... BUT you must be humble while takling to somebody...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Mon Jun 18, 2012 1:30 am
Reply with quote

Hello,

Depending on the specifics (which you didn't post), you should be able to do this with your sort product.

Multiplying by -1 should accomplish what you want.

Depending on which sort product you use, there are probably examples here in the forum (DFSORT section for DFSORT and JCL section for Syncsort).

If you get stuck, post your issue and someone should be able to clarify.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jun 18, 2012 2:15 am
Reply with quote

Quote:
BUT you must


no, I MUST nothing.....

besides,
I post so that others reading your mistakes
know that what you have said is incorrect.

I had no illusions that you would see the error of your ways,
you are too busy trying to enforce what you think are Politically Correct Comments.

you have insulted everyone who spends at least enough time to use the correct terminology.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jun 18, 2012 2:32 am
Reply with quote

Besides,
you could avoid receiving all this 'bad talk'
if you would just do what most everyone else on the planet does,
Read the Manuals
(there are lots of figures and pictures, too!)
instead of being lazy and asking questions on an internet website.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Mon Jun 18, 2012 3:22 pm
Reply with quote

ppandey07 wrote:
I have to modify three fields and there is one requirment to change sign of these three fields(make+ve to -ve and -ve to +ve).
SORT, INREC/OUTREC OVERLAY, MULtiply by "-1" ?
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Mon Jun 18, 2012 6:33 pm
Reply with quote

dick scherrer wrote:
Hello,

Depending on the specifics (which you didn't post), you should be able to do this with your sort product.

Multiplying by -1 should accomplish what you want.

Depending on which sort product you use, there are probably examples here in the forum (DFSORT section for DFSORT and JCL section for Syncsort).

If you get stuck, post your issue and someone should be able to clarify.


Thank you for your suggestions!!! I will try to use this.
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Mon Jun 18, 2012 6:35 pm
Reply with quote

Anuj Dhawan wrote:
ppandey07 wrote:
I have to modify three fields and there is one requirment to change sign of these three fields(make+ve to -ve and -ve to +ve).
SORT, INREC/OUTREC OVERLAY, MULtiply by "-1" ?


Okay. Let me try this. Thank you!!!
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: Mon Jun 18, 2012 11:36 pm
Reply with quote

Subtract from zero. Unless you have millions and millions, maybe you won't notice. But if you do, you may. So I always subtract from zero.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts Sorting Date Field DFSORT/ICETOOL 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
Search our Forums:

Back to Top