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 to spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Wed Mar 19, 2008 1:22 pm    Post subject: Change to spaces
Reply with quote

Hi all,

I want to change the first two columns of my FB file to spaces. The current file layout is as:
Code:
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31
XX1920-01-012005-08-03  2005-08-03 9999-12-31


However, I want the same to appear as:
Code:
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31
  1920-01-012005-08-03  2005-08-03 9999-12-31


Please help me out regarding the same.
Back to top
View user's profile Send private message

HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Wed Mar 19, 2008 1:28 pm    Post subject:
Reply with quote

try this option in your edited member command line

C 1 3 P'XX' '' ALL

Cheers,
Srini
Back to top
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Wed Mar 19, 2008 1:31 pm    Post subject:
Reply with quote

Thanks for your suggestion...

But I want a SORT card for the same. This is to be performed while executing my job.

I don't want the manual change. icon_sad.gif
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Mar 19, 2008 2:13 pm    Post subject:
Reply with quote

Swapnadeep,

Use outrec ifthen=(when=....,overlay=....). For examples, saerch thru forum.
Back to top
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Wed Mar 19, 2008 2:32 pm    Post subject:
Reply with quote

All the examples that are provided involves ICEMAN/DFSORT. But I require the SYNCSORT card for the same.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10254
Location: italy

PostPosted: Wed Mar 19, 2008 2:35 pm    Post subject: Reply to: Change to spaces
Reply with quote

You got an answer in terms of "ICE...." because You posted to the DFSORT/ICETOOL
Anyway both products have a strong base of similar/identical functionalities
so it should not be difficult to search for a similar requirement and it' s solution
Back to top
View user's profile Send private message
anil salve b

New User


Joined: 31 Oct 2007
Posts: 3
Location: Mumbai

PostPosted: Wed Mar 19, 2008 2:40 pm    Post subject:
Reply with quote

Use this Sort card for the same,taken LRECL=80
OUTREC FIELDS=(01,02,CHANGE=(2,C'XX',C' '),NOMATCH=(01,02),
03,78)
SORT FIELDS=COPY
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1228
Location: Israel

PostPosted: Wed Mar 19, 2008 2:54 pm    Post subject:
Reply with quote

same without CHANGE:
Code:
  OUTREC FIELDS=(1:2X,3:3,78)
  SORT FIELDS=COPY
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Wed Mar 19, 2008 8:47 pm    Post subject:
Reply with quote

Hi Srini,

Please elaborate on
Quote:
C 1 3 P'XX' '' ALL


How does it work?


Thanks,
Ajay
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Mar 19, 2008 10:18 pm    Post subject: Re: Change to spaces
Reply with quote

swapnadeep.ganguly wrote:
I want to change the first two columns of my FB file to spaces.

You can also try this:
Code:

//SYSIN DD *
    SORT FIELDS=COPY
    OUTREC OVERLAY=(1:2X)
/*
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: Wed Mar 19, 2008 10:22 pm    Post subject:
Reply with quote

Hello,

Code:
C 1 3 P'XX' '' ALL


Quote:
How does it work?
This is an editor command intended to remove the XX in cols 1 & 2. I believe it will not give the requested result due to shifting.

To get what i believe is the required result, i'd use:
Quote:
Code:
 C 1 2 'XX' '  ' ALL
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Wed Mar 19, 2008 11:00 pm    Post subject:
Reply with quote

Hi,

dick scherrer wrote:
This is an editor command intended to remove the XX in cols 1 & 2.
And in your 'internal perception' You can spell it as "change all XX with two SPACES starting from column 1"
Quote:
I believe it will not give the requested result due to shifting.
Yes, it will not provide the expected result, second-code shown by You would result expected outcome.


P.S.: Perhaps I'm too young too give any suggestion but Swapnadeep this problem was pretty simple, You could've done with it with a very little effort from your side. Your maximum post are on SORT, so I believe You do have manuals. To put two spaces in SORTOUT using in inrec/outrec was not a big deal..perhaps no magic from Alissa or Frank was needed. Just a personal view.. don't be addicted to forum. Please don't take it otherwise, no offences meant... icon_smile.gif

have a good one,

later
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am


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