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

How to increase a field's size in a record


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

New User


Joined: 07 Jun 2005
Posts: 70
Location: South Africa

PostPosted: Wed Jan 18, 2006 8:30 pm
Reply with quote

I want to increase a field's size in a record when the first seven chars are = 'NT01001'. Say for instance the field must be increased from pic 9(3) to pic 9(5) but the record length stays the same. I've tried ICETOOL but can't seem to get it right?
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 Jan 18, 2006 9:31 pm
Reply with quote

You didn't give much detail, so I'll give you a made up example to show you how to do this.

9(3) is a 3-byte ZD field. 9(5) is a 5-byte ZD field.

Let's say your input file has RECFM=FB and LRECL=80. The input records look like this:

NT01001123
NT01001005
NT02001631

and you want the output file to have RECFM=FB and LRECL=80 with records that look like this:

NT0100100123
NT0100100005
NT02001631

You can use a DFSORT job like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,7,CH,EQ,C'NT01001'),
         BUILD=(1,7,8:8,3,ZD,TO=ZD,LENGTH=5,13:11,68))
/*


If you need more specific help, you need to describe in detail what you're trying to do.
Back to top
View user's profile Send private message
donevin

New User


Joined: 07 Jun 2005
Posts: 70
Location: South Africa

PostPosted: Thu Jan 26, 2006 7:57 pm
Reply with quote

Thank you very much Frank. Your example was sufficient. I was able to expand my jobcard from your suggestion.
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 SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top