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

OUTREC: PADDING SPACES AT THE END


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinut123

New User


Joined: 11 Oct 2005
Posts: 62
Location: India

PostPosted: Thu Jan 28, 2010 10:12 am
Reply with quote

Hi

Im doing a reformat for the input record using outrec. The output file rec length is 250 chars and i'm taking only partial data from the input file using outrec. All the left over positions in output file filled in with the low values. How can i avoid this. please help..

sort card i used is:

//SYSIN DD *
SORT FIELDS=(7,4,CH,A,12,10,CH,A,24,34,CH,A)
OUTREC FIELDS=(1:C'ADR',
4:7,4,
8:12,10,
18:C' ',
38:24,34)

so only 48 positions have data in output file and rest are filled in with low values. Now I want have spaces from 49 till end of file.

thanks
Sri
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Jan 28, 2010 1:41 pm
Reply with quote

Hi,

what is in position 38-71 comes from the input file, so you must have low values in the input file between 24-57, use the following to space fill from 72-250
Code:
38:24,34,250:X)



Gerry
Back to top
View user's profile Send private message
srinut123

New User


Joined: 11 Oct 2005
Posts: 62
Location: India

PostPosted: Thu Jan 28, 2010 5:25 pm
Reply with quote

Gerry,

It worked!

Thanks alot!

Sri
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Jan 28, 2010 10:36 pm
Reply with quote

Quote:
so you must have low values in the input file between 24-57


Actually, the low values (binary zeros) are added by DFSORT as padding bytes when the OUTREC length is less than the output LRECL. By adding the 250:X, you ensure that blank padding is used and that the OUTREC length is equal to the output LRECL.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 29, 2010 2:29 am
Reply with quote

Hi Frank,

the LENGTH of the OUTREC provided by the OP is 71 bytes, so if there are low values between 49-71 they are coming from the input file.

I realise that DFSORT pads out the record with binary zeroes when the OUTREC length is less than the output LRECL.


The OP said
Quote:
so only 48 positions have data in output file and rest are filled in with low values. Now I want have spaces from 49 till end of file
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Jan 29, 2010 3:18 am
Reply with quote

Quote:
so only 48 positions have data in output file and rest are filled in with low values. Now I want have spaces from 49 till end of file


Oh, I missed where he said that. You're right. I should have said:

Some of the zero bytes come from the input record and the rest come from DFSORT padding because the OUTREC length is less than the output LRECL.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
No new posts How to remove spaces in between. SYNCSORT 12
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
Search our Forums:

Back to Top