Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Exclude Header and Trailer from Outrec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sudib19

New User


Joined: 06 Feb 2007
Posts: 29
Location: Noida

PostPosted: Tue Mar 12, 2013 12:46 am    Post subject: Exclude Header and Trailer from Outrec
Reply with quote

Hi,

I have a file of 49 bytes, it has a header, detail record and trailer. I want to put in 00 in the 20th bytes and copy rest of the data to a new file, I also want to keep the header and trailer as it is.
Code:

----+----1----+----2----+----3----+----4----+----
********************************* Top of Data ***
0SL122012
1211740  20425173021108857923091822794830450372
900001


My file should look like
Code:

----+----1----+----2----+----3----+----4----+----
********************************* Top of Data ***
0SL122012
1211740  2042517302001108857923091822794830450372
900001


I have tried using DATASORT but that does not allow OUTFIL OUTREC or BUILD. I have the TOOLIN data as

Code:


//TOOLIN DD *
MODE STOP
DATASORT FROM(I1) TO(O1) HEADER(1) TRAILER(1) USING(CTL1)
//CTL1CNTL DD *
   OUTFIL BUILD=(1:1,19,20:C'00',22:20,28)


But it gives me an error
Code:

DATASORT FROM(I1) TO(O1) HEADER(1) TRAILER(1) USING(CTL1)
SORT FUNCTION IS REQUIRED FOR DATASORT OPERATION
OPERATION RETURN CODE:  12


Please let me know how to resolve it.

Thanks
Sudib19
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Mar 12, 2013 12:53 am    Post subject: Reply to: Exclude Header and Trailer from Outrec
Reply with quote

Do you want the data sorted?

Code:
  INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'1'),
                  OVERLAY=(20:C'00'))
Back to top
View user's profile Send private message
sudib19

New User


Joined: 06 Feb 2007
Posts: 29
Location: Noida

PostPosted: Tue Mar 12, 2013 1:27 am    Post subject:
Reply with quote

Thanks for your post Bill

No I do not need the data to be sorted.

The data in position 20 can be anything.

I would need 00 to be added to the 20th position.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Mar 12, 2013 1:31 am    Post subject:
Reply with quote

sudib19 wrote:
Thanks for your post Bill

No I do not need the data to be sorted.

The data in position 20 can be anything.

I would need 00 to be added to the 20th position.


sudib19,

why are using DATASORT when you don't need the data to be sorted? It is a simple COPY step. Use the control cards shown by Bill but use a COPY operator.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Mar 12, 2013 1:32 am    Post subject:
Reply with quote

sudib19 wrote:
Thanks for your post Bill

No I do not need the data to be sorted.

The data in position 20 can be anything.

I would need 00 to be added to the 20th position.
That is to say, you wish the characters "00" inserted at the 20th position, with the data in positions 21-47 shifted to the right. The input data set is generated by a program written by someone who knew what was doing, so positions 47-49 are guaranteed to be spaces, hex zeroes, or other "don't care" values, right?
Back to top
View user's profile Send private message
sudib19

New User


Joined: 06 Feb 2007
Posts: 29
Location: Noida

PostPosted: Tue Mar 12, 2013 2:28 am    Post subject:
Reply with quote

Thanks all for your help.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Tue Mar 12, 2013 6:27 am    Post subject: Reply to: Exclude Header and Trailer from Outrec
Reply with quote

DATASORT is for sorting the data whilst leaving any headers or trailer which you identify to it in their original relative positions on the file.

DATASORT requires a SORT statement, which will be applied to all records not identified as headers or trailers.

It is not just a way to exclude headers and trailers from your processing.

Due to the 0, 1 or 9 in the first position of each record, it is easy for you to identify the data records, and to only change those, with the simple IFTHEN=(WHEN=(logicalexpresion shown to you with the OVERLAY to change the data positions to the value you require.
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am
No new posts OUTREC RDW NOT INCLUDED krsenthil85 SYNCSORT 10 Fri May 06, 2016 3:22 am
No new posts DSN name in trailer kranthikumarb DFSORT/ICETOOL 7 Mon Feb 29, 2016 11:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us