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
 
How to make a sequential file delimited with some character?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Bangalore

PostPosted: Fri Jun 08, 2007 4:24 pm    Post subject: How to make a sequential file delimited with some character?
Reply with quote

Hi,

I have a VSAM which I converted into a sequential file. I want to make each& evry field of this file delimited with some character( say comma(,)).

Can I do the same using JCL( I mean some utility like DFSORT). But the file is too large to be handled by DFSORT, that it contains more than 500 fields.

Thanks,
Reni
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 08, 2007 7:48 pm    Post subject:
Reply with quote

Hello,

You can do what you want using STRING with a bit of COBOL code.
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: Sat Jun 09, 2007 9:55 pm    Post subject:
Reply with quote

Quote:
Can I do the same using JCL( I mean some utility like DFSORT). But the file is too large to be handled by DFSORT, that it contains more than 500 fields.


Why do you assume that's too large for DFSORT to handle?

Show an example of your input records and what you want for output.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Jun 10, 2007 6:24 am    Post subject:
Reply with quote

Hello,

Kind of thinking out loud, but i'd not want to have to code the displacements of 500 fields as well as the displacements for each delimiter character. Not only would that take a lot of time and be quite error prone, but it would need to be re-done if a field that occurred early in the record had a length change or if there was a field addition or deletion.

Using the copybook, the STRING statement could be built quickly by simple editing commands and no time would be spent typing all of the "fields" start, length, type, etc.
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 Jun 10, 2007 8:23 pm    Post subject:
Reply with quote

Quote:
the STRING statement could be built quickly by simple editing commands and no time would be spent typing all of the "fields" start, length, type, etc.


You can use DFSORT Symbols to avoid typing the start, length, type, etc as well. We even have a REXX available that can convert COBOL copy books to DFSORT symbols. See the "Create DFSORT Symbols from COBOL COPYs" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Bangalore

PostPosted: Tue Jun 12, 2007 6:08 pm    Post subject:
Reply with quote

Hi

Actually I am doing a conversion of an existing VSAM file into a DB2. That means it is a 1 time run & no further change in the length of the filed will effect the piece of code if it is written in JCL using DFSORT.

So you are telling me that DFSORT itself can be used for the same if we could generate the symbols using the REXX program, 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: Tue Jun 12, 2007 8:52 pm    Post subject:
Reply with quote

You can try using DFSORT control statements something like this:

Code:

   OPTION COPY
   INREC BUILD=(Symbol1,C',',
     Symbol2,C',',
     Symbol3,C',',
     ...
     Symbol500)


where Symbol1-Symbol500 are the DFSORT Symbols for your fields. hat might be too many fields or it might not - the only way to know is to try it.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 12, 2007 9:39 pm    Post subject:
Reply with quote

Hello,

You might just repro the data from vsam and directly load it into db2. The db2 load does not require delimiters iirc. . .

It supports delimiters, but should work with fixed data ase well. . .
Back to top
View user's profile Send private message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 59
Location: Bangalore

PostPosted: Wed Jun 13, 2007 4:54 pm    Post subject:
Reply with quote

Hi dick,

As you said, Can we directly load the data into the DB2 table without a delimiter?wont it create any problems on the table side?I want to confirm it.

Thanking you,
Reni
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 13, 2007 6:13 pm    Post subject:
Reply with quote

Hello,

As long as the fixed length data in the repro'd file matches the definitions of the db2 columns, you should be ok.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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