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
 

 

Flip Signs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Wed Jul 15, 2015 8:01 am    Post subject: Flip Signs
Reply with quote

Hi ,

Need all veterans help for solving the below problem.

My input file is as below, which is in fixed length formaT:

Quote:

01CDC+12345.90
02CDC-134500.00
01FTG-145678.89
01RFR-345670.00


My requirement is flip the sign for
- 'CDC' to ''-' whenever the sign is '+',
- 'RFR to ''+' whenever the sign is '-'

Can this be done using JCL sort? Please help

[/quote]
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Wed Jul 15, 2015 12:10 pm    Post subject: Reply to: Flip Signs
Reply with quote

Code:
  OPTION COPY
  INREC IFTHEN=(WHEN=(3,3,CH,EQ,C'CDC',
                       AND,6,1,CH,EQ,C'+'),
                  OVERLAY=(6:C'-')),
        IFTHEN=(WHEN=(3,3,CH,EQ,C'RFR',
                       AND,6,1,CH,EQ,C'-'),
                  OVERLAY=(6:C'+'))


Something like that. You know deep down it's not JCL, don't you? You know you are not updating a VSAM file in place? You know that you posted in the wrong forum (DFSORT or SYNCSORT depending on the product you use)?
Back to top
View user's profile Send private message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Wed Jul 15, 2015 8:00 pm    Post subject: Reply to: Flip Signs
Reply with quote

Thanks Bill.

Yes its JCL and am not using VSAM files.

I am sorry if i have posted in the wrong forum, will take care in future
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Wed Jul 15, 2015 8:22 pm    Post subject: Reply to: Flip Signs
Reply with quote

Sometimes I wonder why such questions are being entertained when there is a plenty of information available on the internet on how to do this.

This could have been resolved with a minimal effort of 10 mins browsing the internet.

Not doing research before posting the question should be considered a crime on the forum icon_mad.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Jul 16, 2015 3:20 am    Post subject:
Reply with quote

It is a crime in most forums hence many sghort answers referring OP/TS to colleagues, manuals, internet. But the bigger crime, perhaps, is not reading the forum rules where such things are indicated.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 159
Location: Chennai

PostPosted: Fri Jul 17, 2015 7:17 pm    Post subject: Reply to: Flip Signs
Reply with quote

Bill,

How about this, avoid couple of overlay's ?

Code:

//SYSIN DD *                                               
  INREC OVERLAY=(3:3,4,CHANGE=(4,C'CDC+',C'CDC-',           
                                 C'RFR-',C'RFR+'),         
                       NOMATCH=(3,4))                       
  OPTION COPY                                               
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Fri Jul 17, 2015 7:41 pm    Post subject: Reply to: Flip Signs
Reply with quote

Looks good to me :-)
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Sat Jul 18, 2015 2:51 am    Post subject:
Reply with quote

Good work Magesh icon_smile.gif
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 Can CICS flip across LPAR at runtime dick scherrer CICS 8 Tue Jul 07, 2009 7:19 pm
No new posts "Flip bit" on a character f... Alain Joyal DFSORT/ICETOOL 9 Wed Nov 19, 2008 1:19 am
No new posts Handling negative signs in EZtrieve Ajeevlal CA Products 5 Fri Aug 17, 2007 4:51 pm
No new posts summation of duplicate records consid... Frank Yaeger DFSORT/ICETOOL 3 Thu Apr 12, 2007 5:26 pm
No new posts Sun Signs for Software Professionals Gautam512 General Talk & Fun Stuff 1 Thu Jan 12, 2006 12:38 pm


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