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 insert a field?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to insert a field?
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    Post subject: Reply to: How to insert a field?
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: 1439
Location: Bangalore,India

PostPosted: Sun Jan 13, 2008 8:27 pm    Post subject:
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 Moderator


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

PostPosted: Sun Jan 13, 2008 11:21 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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