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
 

 

How to increase a field's size in a record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to increase a field's size in a record
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 Moderator


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

PostPosted: Wed Jan 18, 2006 9:31 pm    Post subject:
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    Post subject: Solved
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    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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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