combine CONVERT & TRAN=ALTSEQ



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

combine CONVERT & TRAN=ALTSEQ

Postby ranga_subham » Thu Jul 16, 2009 3:47 pm

Hi,

Can we combine CONVERT & TRAN=ALTSEQ features while converting a VB to FB? Please help me with an example code.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

 

Re: combine CONVERT & TRAN=ALTSEQ

Postby Alissa Margulies » Thu Jul 16, 2009 8:39 pm

Please provide an example of what you are trying to accomplish and then we may be able to provide you with some sample JCL.
What does your input data look like? What is your desired output? Please include the LRECL of both files as well.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

Postby ranga_subham » Fri Jul 17, 2009 8:07 pm

Alissa, my input file (LRECL=133, RECFM=VB) has data as shown below:

----+----1----+----2----+
.00000191122.00001.
.00000183438.00001.
.00000110289.00001.


Upon viewing it with HEX ON, I find low values (X'00',X'05',X'06',X'07' etc) at many places. My requirement is to copy this VB file to FB file of 80 bytes and at the same time to convert all these low values to spaces.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

Postby Alissa Margulies » Fri Jul 17, 2009 10:45 pm

Since your input data set is VB/133 and you want your output FB/80, you are obviously truncating the data. So do you want the 80 bytes to include the RDW (1,80) or include the 80 bytes after the RDW (5,80)?
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

Postby Alissa Margulies » Fri Jul 17, 2009 10:49 pm

If you want the RDW included, then here is one way of accomplishing this task:
//SYSIN DD  *                                                     
  SORT FIELDS=COPY                                                 
  ALTSEQ CODE=(0040,0140,0240,0340,0440,0540,0640,0740,0840,0940) 
  OUTREC FIELDS=(1,80,TRAN=ALTSEQ),CONVERT                         
/*                                                                 

In SyncSort for z/OS 1.3.2, this can also be accomplished using FINDREP instead of ALTSEQ.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

Postby ranga_subham » Fri Jul 17, 2009 11:20 pm

Thanks. I don't want the RDW because I don't know if it becomes valid data to be read ! Though the length of input file is 133 the real data appears till 67th column only. That way I don't get it truncated if copied to 80 byte output file.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

Postby Alissa Margulies » Sat Jul 18, 2009 12:09 am

ranga_subham wrote:I don't want the RDW

Then you can simply modify the OUTREC statement as follows:
OUTREC FIELDS=(5,80,TRAN=ALTSEQ),CONVERT                             
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

Postby ranga_subham » Sun Jul 19, 2009 9:25 pm

Thanks :D
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

Postby jvinoth » Tue Nov 12, 2013 5:56 pm

Hi Alisa,

I have similar kind of issue.

Input file : Record format . . . : FBA
Record length . . . : 75
Input:
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 AAAAAAAAAAAA AAAAAAA AAAA AAAAAA AA AAA AAA AAA AAAAAAA AAAAAAAAAA
001250504158060000000964350364502815330950993045706120453535402433522643454445555544
00125050415806000000096435036450281533095099304570612045353540243352264345556655555B

and trying to copy to the FB file with the record length 80 using the sort.

I have used the below code to convert first two bytes of x'00' and last x'4B' to x'40'. and it changed as expected, but after that i could see
x'00' in the output file.

//SYSIN DD *
SORT FIELDS=COPY
ALTSEQ CODE=(0040,4B40)
OUTREC FIELDS=(1,80,TRAN=ALTSEQ)
/*

Ouput file:
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 AAAAAAAAAAAA AAAAAAA AAAA AAAAAA AA AAA AAA AAA AAAAAAA AAAAAAAAAA
441250504158060000000964350364502815330950993045706120453535402433522643400000 001250504158060000000964350364502815330950993045706120453535402433522643000000
can you please let me know how to change this to spaces.
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: combine CONVERT & TRAN=ALTSEQ

Postby dick scherrer » Tue Nov 12, 2013 8:34 pm

Hello,

Suggest you copy what is good from this reply into a new topic considering:
1. the output appears shorter than the input
2 use the Code tag for data that needs to be aligned (Not colors)
3. there are no x'00's in the input, so why are they in the output?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post