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

Need to change the field length and file length


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

New User


Joined: 09 Apr 2008
Posts: 41
Location: USA

PostPosted: Tue Oct 21, 2008 9:37 pm
Reply with quote

Hi..

I need to change a field length as well as the file length,
My file has the layout as given below,

Field1 - 1-20 (length20)
Field2 - 21-50 (length 30)
Field3 - 51-100(length 50)
Field4 - 101-180(length 80)

Total file length is 180.

Need an output like

Field1 - 1-20 (length20)
Field2 - 21-50 (length 30)
Field3 - 51-90(length 40)
Field4 - 91-145(length 55)

Total file length is 145.


_________
Thanks
Balukanna
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: Tue Oct 21, 2008 9:43 pm
Reply with quote

Assuming you want the first 40 bytes from Field3 and the first 55 bytes from field4, you can use a DFSORT job like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/180)
//SORTOUT DD DSN=...  output file (FB/145)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,90,101,55)
/*
Back to top
View user's profile Send private message
balukanna

New User


Joined: 09 Apr 2008
Posts: 41
Location: USA

PostPosted: Wed Oct 22, 2008 12:06 pm
Reply with quote

Thanks Frank..

Its working fine..
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top