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 All function in Syncsort

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

Active Member


Joined: 01 Dec 2006
Posts: 662
Location: Pennsylvania

PostPosted: Wed Mar 03, 2010 8:43 pm    Post subject: Change All function in Syncsort
Reply with quote

I would like perform a 'Change All' type function.

The input file (FB 80) contains characters x'6D' that we would like to change to x'40' ANYWHERE in the file.

I could write a Rexx program, but since we are ready using Syncsort on the file to Omit records we do not want, I thought we could try and do the Change there.

I found the CHANGE= subparamneter in the manual, but that appears to want a specific column. This data can be in any column.

We have SYNCSORT FOR Z/OS 1.3.2.1R.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Mar 03, 2010 9:18 pm    Post subject:
Reply with quote

SyncSort for z/OS 1.3 Programmer’s Guide wrote:
[c:] p,l,CHANGE=(o,srch1,repl1[,srch2,repl2,...srchn, repln ] )
Doesn't the first p,l allows for the entire output record to be specified?
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 03, 2010 9:31 pm    Post subject:
Reply with quote

ALTSEQ or FINDREP can be helpfull, too - I don't have SyncSort manuals handy, so not very sure if FINDREP would work with your version of SyncSort...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Mar 03, 2010 9:34 pm    Post subject: Reply to: Change All function in Syncsort
Reply with quote

I do not know really about syncsort,
if it were dfsort I would have suggested to use the ALTSEQ stuff
something along the lines
Code:
//SYSIN     DD *                     
  SORT FIELDS=COPY                   
  ALTSEQ CODE=(6d40)                 
  OUTREC FIELDS=(1:1,80,TRAN=ALTSEQ)
//*                                   

most probably syncsort has something equivalent
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 662
Location: Pennsylvania

PostPosted: Wed Mar 03, 2010 9:35 pm    Post subject:
Reply with quote

From how I read it...
Quote:

The following describes the elements of the CHANGE subparameter:
p,l - The normal SyncSort position-length designation that specifies the search field.

When this search field matches a search constant, the input field will
be changed in the output to a replacement value.

For character or hexadecimal search constants, the search field can be 1 to 64 bytes long. For binary search constants, the search field must be one byte.

%pp - Identifies a fixed-length parsed field that specifies the search field.

When this field matches a search constant, the input field will be changed in the output to a replacement value.


I understand it to start position and length.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 662
Location: Pennsylvania

PostPosted: Wed Mar 03, 2010 9:41 pm    Post subject:
Reply with quote

Enrico,

ALTSEQ along with the TRAN=ALTSEQ worked perfectly!

Thanks....
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 03, 2010 9:42 pm    Post subject:
Reply with quote

Enrico- SyncSort also supports ALTSEQ parameter.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Mar 03, 2010 9:44 pm    Post subject:
Reply with quote

Well, my reading is that search field can be any length while the search constant can be as small as one byte.

1,lrecl,CHANGE=(lrecl?,X'6D',X'40')

But for a single byte without replacement length differences, I admit that the ALTSEQ is cleaner.......
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Wed Mar 03, 2010 9:46 pm    Post subject:
Reply with quote

daveporcelan,

The code provided by enrico will work for your Syncsort version as well. Alternatively you can use the new FINDREP feature supported by SYNCSORT FOR Z/OS 1.3.2.1R. as shown below without worrying about the LRECL.
Code:
//SYSIN     DD *                 
  OPTION COPY                     
  INREC FINDREP=(IN=C'_',OUT=C' ')
//*                               
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 662
Location: Pennsylvania

PostPosted: Wed Mar 03, 2010 9:53 pm    Post subject:
Reply with quote

Arun,

Your example worked perfectly as well.

Thanks...

Note: Our manual which is version 1.3, does not have the FINDREP command in it.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Wed Mar 03, 2010 9:56 pm    Post subject:
Reply with quote

daveporcelan wrote:
Note: Our manual which is version 1.3, does not have the FINDREP command in it.
You're welcome. Do you have the manual for SyncSort 1.3.2? If not, request one from Syncsort Support/Alissa. Even I lost my manual. icon_mad.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 -> 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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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