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
 

 

Change sign of a field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Change sign of a field
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: 7904
Location: Bellevue, IA

PostPosted: Sun Jun 17, 2012 6:09 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Jun 18, 2012 1:30 am    Post subject:
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Jun 18, 2012 3:22 pm    Post subject: Re: Change sign of a field
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    Post subject:
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    Post subject: Re: Change sign of a field
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Jun 18, 2012 11:36 pm    Post subject: Reply to: Change sign of a field
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


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