convert VB into FB



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

convert VB into FB

Postby govardhana krishna » Tue Apr 29, 2008 5:54 pm

Hi,
I am trying to convert a record lenght 23040 of VB into FB with Rlength 80.
Basically the file will contain one record of LRECL 23040. Need to cut the whole 23040 LRECL record into multiple 80 bytes FB record.
Is there any sort option to get it done?

It is very urgent requirment!!!
govardhana krishna
 
Posts: 5
Joined: Tue Apr 29, 2008 5:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert VB into FB

Postby Frank Yaeger » Tue Apr 29, 2008 9:40 pm

You could use a DFSORT job like this:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB/23040)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL VTOF,BUILD=(5,80,/,85,80,/,165,80,/,245,80,/,325,80,/,
    405,80,/,485,80,/,565,80,/,645,80,/,725,80,/,
    ...
    ...)
/*


You'd need to fill in all of the lines to get to 23040. I'm assuming you don't want the RDW (positions 1-4 of the VB record) in your FB records - that's why I started at position 5.

We could use DFSORT to generate the OUTFIL statement rather than coding it by hand. If you want me to show you how, tell me if you want the RDW in your first FB output record or not. Note that since the RDW is the first 4 bytes, if you start at position 5 for the first output record, the last output record will actually be 4 bytes short (76 bytes) so it will be padded with 4 blanks at the end.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: convert VB into FB

Postby govardhana krishna » Tue Apr 29, 2008 9:56 pm

Hi Frank,

Thanks for shareing your time.
1) Acutally RF=VB, LRECL= 23036 and block size is 23040. out of the record size the actuall content will be in few records only, so the last record's length can be padded with spaces..

2) I just did a scan on our system to check whether we are able to use ICEMAN...but i couldnt get a single sort job using it..
will it work with DFSORT too..

3) I don't need the RDW.

Once again Thanks a lot.

Cheers,
Govi
govardhana krishna
 
Posts: 5
Joined: Tue Apr 29, 2008 5:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert VB into FB

Postby Frank Yaeger » Tue Apr 29, 2008 10:26 pm

out of the record size the actuall content will be in few records only


Which records? If it's only a few records, then you can just hardcode the OUTFIL statement as shown in my previous post to get those few records.

I just did a scan on our system to check whether we are able to use ICEMAN...but i couldnt get a single sort job using it..
will it work with DFSORT too..


PGM=ICEMAN invokes the sort product your site is using which can be DFSORT or Syncsort.

Run the following job:

//S1    EXEC  PGM=ICEMAN                                             
//SYSOUT    DD  SYSOUT=*                                             
//SORTIN DD *                                                       
RECORD 1                                                             
//SORTOUT DD SYSOUT=*     
//SYSIN    DD    *                                                   
    OPTION COPY                                                       
/*


Look at the //SYSOUT messages to see which product you're using (ICExxxs messages for DFSORT or WERxxxs messages for Syncsort). Which product are you using?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: convert VB into FB

Postby govardhana krishna » Wed Apr 30, 2008 4:12 am

Hi Frank,
The problem with hard coding is, we dont know how many few records we get...once we might get 10 records or 20 or 30...thats why...it is better to have some standard syntax...please advice...

secondly about ICEMAN...we are using DFSORT only..but i afraid whether icewan will work..anyway i will check it tomorrow...

Thanks,
Govi
govardhana krishna
 
Posts: 5
Joined: Tue Apr 29, 2008 5:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert VB into FB

Postby Frank Yaeger » Wed Apr 30, 2008 4:50 am

The problem with hard coding is, we dont know how many few records we get...once we might get 10 records or 20 or 30...thats why...it is better to have some standard syntax


I can't give you a "standard syntax" until you describe the "rules" for coming up with that syntax. I really don't know what you're trying to do. You've mentioned breaking up a 23040 byte VB record into 80 byte FB records. Then you mentioned that you only need some of the records. So it isn't clear to me what your definition for that "standard syntax" is. We can use DFSORT to generate control statements to do almost anything with DFSORT, but YOU need to describe what EXACTLY that anything is before I can show you how to generate the control statements you need.

secondly about ICEMAN...we are using DFSORT only..but i afraid whether icewan will work..anyway i will check it tomorrow..


Well, iceWan won't work. ;) PGM=ICEMAN will work. It just invokes the sort product at your site, which you've said is DFSORT. PGM=ICEMAN and PGM=SORT work with all of the sort products, unless somebody at your site has done something very weird.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: convert VB into FB

Postby CICS Guy » Wed Apr 30, 2008 6:25 am

govardhana krishna wrote:1) Acutally RF=VB, LRECL= 23036 and block size is 23040. out of the record size the actuall content will be in few records only, so the last record's length can be padded with spaces..
So you are saying that the MAX lrecl is 23036 which might consists of somewhere between 1 and 287.90 80 byte records? (blksize=LLBB+llbb+data) (lrecl=llbb+data) (max data=32032=287.9) the .9*80=72 bytes max).....
So when the actual lrecl (of these unblocked variable length records) might happen to be 204, you want three records, two full of the data and the third half full with blank padding?
Could the variable length records actually be blocked, I don't see how would make much difference?
Do you want the FB output blocked?
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: convert VB into FB

Postby govardhana krishna » Wed Apr 30, 2008 3:00 pm

Hi Frank,
Good morning..

Sorry to confuse you,

What I meant was, the outfil statement generation using DFSORT rather than coding it by hand. (Which you have mentioned in your first reply) and I don’t want the RDW in first FB output record.

Now I have one small change in the requirement:
As I said I have to cut every 80 bytes record and put it in output file…
After removing 80 bytes record say (5,80).i need to skip next two bytes because it contains CRLF (Carriage Return and Line Feed) and continue from (87,80) and again skip next two bytes (169,80) and continue so on..Till 23032.
Is there any way to make this also done?.

Thanks a lot for your support and quick response.


Regards,
Govi
govardhana krishna
 
Posts: 5
Joined: Tue Apr 29, 2008 5:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: convert VB into FB

Postby CICS Guy » Wed Apr 30, 2008 7:13 pm

God luck all....

This does sound like a very simple programming project, 15 to 20 minutes in COBOL or EZT..........
But I am looking forward to (if possible) a DFSORT/ICETOOL/ICEGENER solution.....

Bill
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: convert VB into FB

Postby govardhana krishna » Wed Apr 30, 2008 7:40 pm

Hi Bill,

You are right, program should not take much time...but i was looking is there any way to do with Sort..

Cheers,
Govi.
govardhana krishna
 
Posts: 5
Joined: Tue Apr 29, 2008 5:47 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post