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
 

 

Convert the Record length VB to FB

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Convert the Record length VB to FB
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: 1439
Location: Bangalore,India

PostPosted: Mon Dec 10, 2007 3:24 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Mon Dec 10, 2007 4:10 pm    Post subject: Reply to: Convert the Record length VB to FB
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    Post subject:
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

Senior Member


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

PostPosted: Mon Dec 10, 2007 5:12 pm    Post subject:
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Mon Dec 10, 2007 7:38 pm    Post subject: Reply to: Convert the Record length VB to FB
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

http://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: 1288
Location: Chennai, India

PostPosted: Mon Dec 10, 2007 7:52 pm    Post subject: Reply to: Convert the Record length VB to FB
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 Moderator


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

PostPosted: Mon Dec 10, 2007 10:37 pm    Post subject:
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    Post subject:
Reply with quote

Thanks frank,

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

Senior Member


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

PostPosted: Tue Dec 11, 2007 1:09 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Dec 13, 2007 1:55 pm    Post subject:
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 Moderator


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

PostPosted: Thu Dec 13, 2007 10:39 pm    Post subject:
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    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 Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm


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