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

Need to remove the first six chars from my input file


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

New User


Joined: 16 Mar 2007
Posts: 3
Location: Chennai

PostPosted: Wed May 09, 2007 1:36 pm
Reply with quote

I need to remove the first six chars from my input file and get the output from the seventh position.

can anyne sugget me ways...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 09, 2007 1:40 pm
Reply with quote

A couple of questions .........

Which sort product are you using
Are the records FB or VB
What is the LRECL
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: Wed May 09, 2007 8:54 pm
Reply with quote

kalai.s,

If your input file has RECFM=FB and LRECL=n, you can use this DFSORT job where m=n-6 (e.g. for LRECL=80, m=76):

Code:

//FB    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=... output file
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(7,m)
/*


If your input file has RECFM=VB, you can use this DFSORT job:

Code:

//VB    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=... output file
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,4,5:11)
/*


Note that for a VB file, the 4-byte RDW is in positions 1-4 and the first data byte starts at position 5, so the seventh data byte starts at position 11.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top