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
 

 

Need to change the field length and file length

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

New User


Joined: 09 Apr 2008
Posts: 41
Location: chennai

PostPosted: Tue Oct 21, 2008 9:37 pm    Post subject: Need to change the field length and file length
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 Moderator


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

PostPosted: Tue Oct 21, 2008 9:43 pm    Post subject:
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: chennai

PostPosted: Wed Oct 22, 2008 12:06 pm    Post subject:
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    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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm


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