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

How to insert a field?


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

New User


Joined: 16 Sep 2007
Posts: 33
Location: India

PostPosted: Sun Jan 13, 2008 8:15 pm
Reply with quote

Hi ,

I have the following requirement :-
I have to insert a field which will contain a constat NUMERIC '9' in all its
occurences in the file ,Ex:
Input file :
File A
------------

Code:

field1(2 bytes)   field2(1 byte)   field 3(1 byte)
----------------- ---------------- -----------------
aa                   b                  c
df                   v                  m
..                     .                   .


I have to insert the field between field1 and field 2.

Pardon my ignorance.I'm going thru the mannual , hope to get the solution on my own.

Regards.
Back to top
View user's profile Send private message
Pradip kumar Mohanty

New User


Joined: 16 Sep 2007
Posts: 33
Location: India

PostPosted: Sun Jan 13, 2008 8:21 pm
Reply with quote

Opps , the formatting got lost for the records. 'b' and 'c' are the second and third recs respectively.

Some more info : the input file is a sequential file with FB format.

Essentially I have to increase the RECLEN by 2 bytes ( the constant is '09' for example).

Just a pointer will be enough ; I can customize to my exact need.

Thanks.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Sun Jan 13, 2008 8:27 pm
Reply with quote

Pradip,
Quote:
Just a pointer will be enough ; I can customize to my exact need.

Its always good to do some 'R' (referring manual) work....
You could go with either INREC/OUTREC statement. Go thru manuals for usag e and syntax.

You could also use forum's 'search' facility, as this was discussed many times earlier.
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: Sun Jan 13, 2008 11:21 pm
Reply with quote

Pradip,

You can use DFSORT statements like this:

Code:

  OPTION COPY
  INREC BUILD=(1,2,C'09',3,2)


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts Identify Program Insert DB2 7
Search our Forums:

Back to Top