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

Inserting Value 500 in the Binary format using OUTREC


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

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Tue Jun 08, 2010 8:42 pm
Reply with quote

Hi ..
Could you please let me know how to insert value 500 (in a 4byte binary field) using SORT OUTREC.

Scenario -

Input file - FB/LRECL-30
Output File(FB/LRECL-45) format should be

1 30BYTESFROMINPUTFILE50011111111



Here the field where value 500 should be inserted is defined as binary with length 4 (S9(09) COMP.).

Please help.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jun 08, 2010 9:27 pm
Reply with quote

Is this your input?
Code:
000000000111111111122222222223
123456789012345678901234567890
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Where 'x' is some data.
And is this your expected output?
Code:
000000000111111111122222222223333333333444444
123456789012345678901234567890123456789012345
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9999bbbbbbbbbbb
Where 9999 is a 4 byte binary field with a value of 500 and 'b' is blank/space filler.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Jun 08, 2010 9:29 pm
Reply with quote

Hima1985,


Use the following control cards

Code:

//SYSIN    DD *                                 
  SORT FIELDS=COPY                               
  OUTREC BUILD=(1,30,33:+500,TO=BI,LENGTH=4,45:X)
//*
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Tue Jun 08, 2010 9:34 pm
Reply with quote

Thanks a lottttt .. It worked icon_smile.gif
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 Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
No new posts Need mmmyy date format SYNCSORT 6
Search our Forums:

Back to Top