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: 7948
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: 7270

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 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 37 Tue Dec 06, 2016 8:04 pm


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