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

Change to spaces


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 194
Location: India

PostPosted: Wed Mar 19, 2008 1:28 pm
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
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: 1436
Location: Bangalore,India

PostPosted: Wed Mar 19, 2008 2:13 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Mar 19, 2008 2:35 pm
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
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: 1353
Location: Israel

PostPosted: Wed Mar 19, 2008 2:54 pm
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: 206
Location: Bangalore

PostPosted: Wed Mar 19, 2008 8:47 pm
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: 496
Location: USA

PostPosted: Wed Mar 19, 2008 10:18 pm
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

Moderator Emeritus


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

PostPosted: Wed Mar 19, 2008 10:22 pm
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

Superior Member


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

PostPosted: Wed Mar 19, 2008 11:00 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts how to complete the end of a record w... DFSORT/ICETOOL 2
No new posts BPXBATCH SFTP to remote path having s... All Other Mainframe Topics 6
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
Search our Forums:

Back to Top