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

Flip Signs


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Wed Jul 15, 2015 12:10 pm
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
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: 446
Location: USA

PostPosted: Wed Jul 15, 2015 8:22 pm
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: 2455
Location: Hampshire, UK

PostPosted: Thu Jul 16, 2015 3:20 am
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: 213
Location: Chennai

PostPosted: Fri Jul 17, 2015 7:17 pm
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

Moderator Emeritus


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

PostPosted: Fri Jul 17, 2015 7:41 pm
Reply with quote

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

Global Moderator


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

PostPosted: Sat Jul 18, 2015 2:51 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Code numeric format to display both '... COBOL Programming 7
No new posts Can CICS flip across LPAR at runtime CICS 8
No new posts "Flip bit" on a character f... DFSORT/ICETOOL 9
No new posts Handling negative signs in EZtrieve CA Products 5
Search our Forums:

Back to Top