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

Convert the Record length VB to FB


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

New User


Joined: 20 Apr 2007
Posts: 14
Location: pune

PostPosted: Mon Dec 10, 2007 3:23 pm
Reply with quote

Hi friends,

I have a file of LRECL=412 and RECFM=VB i want to copy the data from postion 13 to 412 and the ouput file should be in the FB format.

I tried using the SORT but it is not supporting when i am changing the output file format to FB it is throwing the error.

Regards,
BRKS.
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Mon Dec 10, 2007 3:24 pm
Reply with quote

BRKS,

This was discussed earlier. Whyd dont you search the forum?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Dec 10, 2007 4:10 pm
Reply with quote

BRKS,

As suggested, please search this forum using the Keyword VTOF.
Back to top
View user's profile Send private message
BRKS

New User


Joined: 20 Apr 2007
Posts: 14
Location: pune

PostPosted: Mon Dec 10, 2007 4:10 pm
Reply with quote

Hi murmohk1

in that it was gvien for the two files using ICETOOL but in my case i am using one file


Reagrds,
BRKS
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Dec 10, 2007 5:12 pm
Reply with quote

Hi,

Try something like this..

Code:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=A123456.VBIN,DISP=SHR
//FBOUT DD DSN=A123456.FBOUT,DISP=(NEW,CATLG,DELETE),
// UNIT=3390,SPACE=(CYL,(5,5))
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(17,416)
/*
Back to top
View user's profile Send private message
BRKS

New User


Joined: 20 Apr 2007
Posts: 14
Location: pune

PostPosted: Mon Dec 10, 2007 6:36 pm
Reply with quote

Hi Anuj,

I have tried with you JCL , i am getting the following Error
Code:

ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 00:00 ON TUE DEC
             OPTION COPY                                                       
             OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(13,396)                     
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE226A 0 SORTOUT  :  BLKSIZE = 27998 IS INVALID (LRECL = 400)                 
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705           
ICE052I 3 END OF DFSORT                                                         

after adding the RDW also i am getting the same error as follows

Code:

ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 00:00 ON TUE DEC
             OPTION COPY                                                       
             OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(1,4,13,396)                     
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5                         
ICE226A 0 SORTOUT  :  BLKSIZE = 27998 IS INVALID (LRECL = 400)                 
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705           
ICE052I 3 END OF DFSORT                                                         
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Dec 10, 2007 7:38 pm
Reply with quote

Anuj,

Code:
OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(17,416)


The actual data starts from position 5 in a VB file and hence the outrec should be OUTREC=(5,X) where X is the VB record length.

BRKS,

Quote:
after adding the RDW also i am getting the same error as follows


Why did you add the RDW? noi point in adding the RDW in the output FB file.

For VB to FB conversion check the DFSORT trick topic "VB to FB conversion" at

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Dec 10, 2007 7:52 pm
Reply with quote

BRKS,

The below JCL converts a VB of LRECL 412 to FB of LRECL 408.

Code:
//S1 EXEC PGM=SORT                                           
//SYSOUT DD SYSOUT=*                                         
//SORTIN DD DSN=      .VB.VB,DISP=SHR                         
//FBOUT DD DSN=      .FBOUT,DISP=(NEW,CATLG,DELETE)           
//SYSIN DD *                                                 
 SORT FIELDS=COPY                                             
 OUTFIL FNAMES=FBOUT,VTOF,OUTREC=(5,408)                     
/*                                                           


What should be your final LRECL? You can add a step after this to write the data from 13 till 412.

Found a typo in my earlier post

Quote:
The actual data starts from position 5 in a VB file and hence the outrec should be OUTREC=(5,X) where X is the VB record length.


Read it as X = (VB LRECL - 4)
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: Mon Dec 10, 2007 10:37 pm
Reply with quote

BRKS,

Here's a DFSORT job that will do what you asked for. I assumed that when you said position 13, you meant data position 13 which would be starting position 17 when you count the RDW in positions 1-4. If you really meant starting position 13 counting the RDW then, change the job accordingly.

DO NOT specify any DCB attributes for the SORTOUT file ... let DFSORT set them automatically.

Code:

//S1    EXEC  PGM=ICEMAN                                       
//SYSOUT    DD  SYSOUT=*                                       
//SORTIN DD DSN=...  input file (VB/412)                           
//SORTOUT DD DSN=...  output file (FB/396)
//SYSIN    DD    *                                             
  OPTION COPY                                                 
  OUTFIL VTOF,BUILD=(17,396)                                   
/*
Back to top
View user's profile Send private message
BRKS

New User


Joined: 20 Apr 2007
Posts: 14
Location: pune

PostPosted: Tue Dec 11, 2007 10:07 am
Reply with quote

Thanks frank,

It solved my problem
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Dec 11, 2007 1:09 pm
Reply with quote

Hi Aaru,

Quote:
i want to copy the data from postion 13 to 412 and the ouput file should be in the FB format.

Due to this I've started from position 17 in my sort card. But was stupid enough in calculating the length icon_redface.gif
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Thu Dec 13, 2007 12:21 pm
Reply with quote

Hi Frank,

Is the BUILD=(17,416) instead of BUILD=(17,396).

Regards.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 13, 2007 1:55 pm
Reply with quote

Hi,

What did you try? Was there any error message?

It should be BUILD=(17,396) as per the information from your previous post.
Quote:
13 to 412 and the ouput file should be in the FB format.


412- 12 = 400 (because you want output from position 13 of input)
400- 4 = 396 (minus four ..because of RDW)
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: Thu Dec 13, 2007 10:39 pm
Reply with quote

Quote:
Hi Frank,

Is the BUILD=(17,416) instead of BUILD=(17,396).


396 is correct for the original poster's requirement.
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 Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top