convert junk values to spaces



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

convert junk values to spaces

Postby mirunalK » Thu Dec 13, 2012 8:11 pm

I am converting the PD fields in a flat file to external decimals.
I need to convert junk values at the field defined as fillers A (143) (length 143 ) to spaces. from 2478.. 143 length has been defined as filler but it had junk values and the same was written to the output at length 2723. Could some one tell me the syntax to convert this junk value to spaces.
I have attached the screen shot of the junk value.

2723:2478,143,
You do not have the required permissions to view the files attached to this post.
mirunalK
 
Posts: 4
Joined: Thu Dec 13, 2012 7:29 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert junk values to spaces

Postby Akatsukami » Thu Dec 13, 2012 8:30 pm

mirunalK wrote:I am converting the PD fields in a flat file to external decimals.
I need to convert junk values at the field defined as fillers A (143) (length 143 ) to spaces. from 2478.. 143 length has been defined as filler but it had junk values and the same was written to the output at length 2723. Could some one tell me the syntax to convert this junk value to spaces.
I have attached the screen shot of the junk value.

Please note that many here cannot or will not download attached files, for security or other reasons. Copy the screen from your emulator and paste it, enclosing it in Code tags
so it  looks   like    this

Note that the Code tags use a fixed-pitch font and do not squeeze out multiple spaces, thus preserving alignment.

Your request is a bit dubious. By "junk values" I presume you mean "non-alphameric glyphs" (unlike toy computers, mainframes use non-printable data quite frequently). Are you sure that these "junk values" are not important data?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: convert junk values to spaces

Postby dick scherrer » Thu Dec 13, 2012 9:06 pm

Hello,

I need to convert junk values at the field defined as fillers A (143) (length 143 ) to spaces. from 2478.. 143 length has been defined as filler but it had junk values and the same was written to the output at length 2723.
I do not understand this at all . . .

If the field(s) are "filler", why does the content matter?

Why has the length changed?

There are no "junk" values every bit pattern from x'00' to x'FF' is valid. May not be what you want, but is still valid.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: convert junk values to spaces

Postby c62ap90 » Thu Dec 13, 2012 11:55 pm

I cannot download your attachment at work but maybe this JCL I did recently to convert certain characters to space (i.e. X'BA' to X'40') can help. Good luck!

//*--            BA,BB,CC,CD,9A,00,AF,0D,25,B8,B2,90,51,54,9E,DF,50   
//*--            CONVERT ALL THE ABOVE HEX CHARACTERS TO SPACES.     
//*-------------------------------------------------------------------
//*                                                                   
//STEP010  EXEC PGM=SORT                   
//SYSOUD   DD SYSOUT=*                                               
//SYSOUT   DD SYSOUT=*                                               
//SYSPRINT DD SYSOUT=*                                               
//SORTIN   DD DSN=<see example input below>, 
//            DISP=SHR                                               
//SORTOUT  DD DSN=<see example output below>,         
//            DISP=(NEW,CATLG,DELETE),             
//            UNIT=(TEST,1),                                         
//            SPACE=(TRK,(15,15),RLSE),                               
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)                       
//SYSIN    DD *                                           
   OPTION COPY                                             
   OUTREC FIELDS=(1,80,TRAN=ALTSEQ)                       
   ALTSEQ CODE=(BA40,BB40,CC40,CD40,9A40,0040,AF40,0D40,   
     2540,B840,B240,9040,5140,5440,9E40,DF40,5040)         
/*                                                         
//                                                         


Input:
-----------------------------------------------------------------------
Switch to hex to see BA,BB,CC,CD,9A,00,AF,0D,25,B8,B2,90,51,54,9E,DF,50
EA8A884A9488A4A94A884CC6CC6CC6CC6FC6FF6CC6FC6FF6CF6CF6FF6FF6FF6FC6CC6FF4
26933803608570360255021B22B33B34B91B00B16B04B25B28B22B90B51B54B95B46B500
 -----------------------------------------------------------------------
A[B]CöDòEªF.G®H.I.J½K¥L°MéNèOÆPÿQ&R S T U V W X Y Z                     
CBCBCCCCC9C0CAC0C2DBDBD9D5D5D9DDD5D4E4E4E4E4E4E4E4E444444444444444444444
1A2B3C4D5A607F8D9318223041546E7F8090203040506070809000000000000000000000
 -----------------------------------------------------------------------


Output:
----------------------------------------------------------------------
Switch to hex to see BA,BB,CC,CD,9A,00,AF,0D,25,B8,B2,90,51,54,9E,DF,50
EA8A884A9488A4A94A884CC6CC6CC6CC6FC6FF6CC6FC6FF6CF6CF6FF6FF6FF6FC6CC6FF
26933803608570360255021B22B33B34B91B00B16B04B25B28B22B90B51B54B95B46B50
 ----------------------------------------------------------------------
A B C D E F G H I.J K L M N O P Q R S T U V W X Y Z                   
C4C4C4C4C4C4C4C4C2D4D4D4D4D4D4D4D4D4E4E4E4E4E4E4E4E44444444444444444444
10203040506070809310203040506070809020304050607080900000000000000000000
 ----------------------------------------------------------------------
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 7 times

Re: convert junk values to spaces

Postby mirunalK » Fri Dec 14, 2012 4:17 pm

Thanks All.. I just tried the following and felt it worked..

SORT FIELDS=COPY
OUTREC OVERLAY=(2723:143X)
mirunalK
 
Posts: 4
Joined: Thu Dec 13, 2012 7:29 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post