Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us