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
 
OUTREC: PADDING SPACES AT THE END

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: OUTREC: PADDING SPACES AT THE END
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: 1703
Location: Australia

PostPosted: Thu Jan 28, 2010 1:41 pm    Post subject:
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    Post subject: Reply to: OUTREC: PADDING SPACES AT THE END
Reply with quote

Gerry,

It worked!

Thanks alot!

Sri
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: Thu Jan 28, 2010 10:36 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Jan 29, 2010 2:29 am    Post subject:
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 Moderator


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

PostPosted: Fri Jan 29, 2010 3:18 am    Post subject:
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    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 Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm

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