Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Using ALTSEQ (multiple translations) only on certain fields

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

New User


Joined: 25 Jan 2007
Posts: 7
Location: Atlanta, GA

PostPosted: Wed Feb 25, 2009 1:40 am    Post subject: Using ALTSEQ (multiple translations) only on certain fields
Reply with quote

Hi, I am wanting to use ALTSEQ on a file to translate some invalid characters that are being sent in only on the first name and last name fields. I do not want to ALTSEQ the whole file because the characters to appear in other places within the file but the request was to only to make those changes to the first and last name fields....Also I need to do multiple translations in order to check and translate different possible characters within these fields...But I DO want to produce the whole file in the OUTREC. Is this possible? How would I code this? Thank you..
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Feb 25, 2009 1:48 am    Post subject: Reply to: Using ALTSEQ (multiple translations) only on certa
Reply with quote

spainj125,

use the following control cards
Code:

//SYSIN DD *
  SORT FIELDS=COPY
  OUTREC OVERLAY=(p1:p1,m1,TRAN=ALTSEQ,p2:p2,m2,TRAN=ALTSEQ)
  ALTSEQ CODE=(....)
/*
/* p1 = position of your firstname field
/* m1 = length of your firstname field
/* p2 = position of your lastname field
/* m2 = length of your lastname field
Back to top
View user's profile Send private message
spainj125

New User


Joined: 25 Jan 2007
Posts: 7
Location: Atlanta, GA

PostPosted: Wed Feb 25, 2009 1:51 am    Post subject:
Reply with quote

Thanks for your help....Will do....
Back to top
View user's profile Send private message
spainj125

New User


Joined: 25 Jan 2007
Posts: 7
Location: Atlanta, GA

PostPosted: Wed Feb 25, 2009 4:09 am    Post subject:
Reply with quote

Ok, I did the above and it worked...But this only works for one character...I need to translate multiple characters within the same field...I have tried several different syntax and they all fail or just tranlate only the first character....Can I use multiple ALTSEQ's within one SORT?
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 Feb 25, 2009 4:20 am    Post subject:
Reply with quote

Hello,

Yes.
Code:
ALTSEQ CODE=(0040,FF40)
This would translate x'00' to a space and x'FF' to a space (x'40'). They just need to be defined in from/to pairs.
Back to top
View user's profile Send private message
spainj125

New User


Joined: 25 Jan 2007
Posts: 7
Location: Atlanta, GA

PostPosted: Wed Feb 25, 2009 4:22 am    Post subject:
Reply with quote

Cool...Yep thanks...was looking for a specific example for syntax but hard to find on the net
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Feb 25, 2009 4:29 am    Post subject:
Reply with quote

ALTSEQ is rather limited. FINDREP and/or IFTHEN clauses with FINDREP can do a lot more.

You can find complete information on DFSORT's FINDREP function at:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Feb 25, 2009 4:32 am    Post subject:
Reply with quote

Quote:
was looking for a specific example for syntax but hard to find on the net


All of the DFSORT books are available online at:

www.ibm.com/systems/support/storage/software/sort/mvs/srtmpub.html

The books include lots of examples. Here are examples for the ALTSEQ statement:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA30/3.4.1?DT=20080528171007

Several of these examples use multiple code pairs.
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 Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm
No new posts Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us