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

Conversion of a VB file to FB.


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

New User


Joined: 29 Oct 2016
Posts: 1
Location: usa

PostPosted: Mon Oct 31, 2016 10:23 pm
Reply with quote

I have tried just about each and every example in this forum but I come up short.
As always the obvious eludes me. .

I have to copy all the records from a VB file DCB=RECFM=VB,LRECL=23036,BLKSIZE=27998)
to a FB file(LRECL=132).
I need to copy only first 132 positions from input file, for each input record.

I am using SORT utility with following this code:


Code:
Code:
//SORT1    EXEC PGM=SORT,REGION=8000K                 
//SORTLIB  DD DSN=SYS1.SORTLIB,DISP=SHR               
//SYSOUT   DD SYSOUT=*                               
//SRTPRINT DD SYSOUT=*                               
//SYSERRBK DD SYSOUT=*                               
//SYSUDUMP DD SYSOUT=*                               
//*                                                   
//SORTWK01 DD UNIT=3380,SPACE=(CYL,(300,100),RLSE)   
//SORTWK02 DD UNIT=3380,SPACE=(CYL,(300,100),RLSE)   
//*       
//SORTCKPT DD DUMMY
//*                                                                               
//*                                                                     
//SORTIN   DD  DSN=T.XMIT.IN.TREAS.DLY3.R161014.C004001.IS1610,         
//             DCB=(RECFM=VB,LRECL=23036,BLKSIZE=27998),               
//             DISP=SHR                                                 
//*                                                                     
//SORTOUT  DD  DSN=T.BRC.TREAS.IIDSRT3.R161014.S1,                     
//             DISP=(NEW,CATLG,DELETE),                                 
//             SPACE=(TRK,(50,150),RLSE),                               
//             DCB=(RECFM=FB,LRECL=132,BLKSIZE=132)                     
//*                                                                     
//SYSIN    DD *                                                         
   SORT FIELDS=COPY                                                     
      OUTFIL VTOF,BUILD=(5,132)                                         
//*                                     


iNPUT FILE: vb
Code:
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6--
****** ***************************** Top of Data ********************
000001  RUN DATE =    10/13/2016                              Ixy VAL
000002                                                               
000003   Dept FILE DSN: XYYYY                                       
000004      xONTROL     AGENCY         AGENCY        ALC          SCH
000005      NUMBER        ID          FILETYPE      NUMBER         NU
000006      d000001       xyz         Ixy xyz      00000001         
000007                                               Accumulated Paym
000008                                                Reported Totals
000009                                                     File Is Ac
000010    0    Invalid                           1st occurrence on pa
****** **************************** Bottom of Data
******************

File portion to the right:

Code:
01.IS1610     Columns 22961 [b]23032 [/b]
                 Scroll ===> CSR 
-0----+----1----+----2----+----3--
ata ******************************


What I need is a FB file of LRECL of 132. Nice report portion.




What I get is one record: lOOKS LIVE THE FIRST 4 BYTES OF THE vb REC
Code:
=COLS> ----+----1----+----2----+----3----+----4----+----5----+
****** ***************************** Top of Data *************
000001   V  ß8 iRUN DATE = i10/13/2016 mITS VALIDATION REPORT
****** **************************** Bottom of Data ***********

014.S1                  Columns 00061 00132
                           Scroll ===> CSR 
-9----+----0----+----1----+----2----+----3--
* Top of Data ******************************
ACH'߶ ¥DEPT      FILE DSN: XYZT.IN.TEST.DLYX3.

 Bottom of Data ****************************





OTHER PERTINENT INFO FOR input FILE:
Code:


 General Data                         
  Management class . . :       
  Storage class  . . . :       
  Volume serial . . . :         
  Device type . . . . :           
  Data class . . . . . : NULL         
  Organization  . . . : PS           
  Record format . . . : VB           
  Record length . . . : 23036         
  Block size  . . . . : 27998         
  1st extent blocks . : 2             
  Secondary blocks  . : 1             
  Data set name type  :               
                                     
                                     
  SMS Compressible  . : NO           


                                 
                                 
                                 
                                 
                                 
                                 
                                 
                                 
 Data ****************************




TKS IN ADVANCE.

I HAVE BEEN READING AND I WILL KEEP ON READING:
Read more: ibmmainframes.com/about41957.html#ixzz4OgE8Ugy6
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 31, 2016 11:49 pm
Reply with quote

Code:
 OUTFIL VTOF,
        IFTHEN=(WHEN=INIT,
                 OVERLAY=(137:X)),
        IFTHEN=(WHEN=INIT,
                 BUILD=(5,132))


That will extend all our records (if needed) to 132 bytes of data. The 137th byte of the input (which you don't need) is clobbered to space. Anything from the original end of record up to the 137th position will be padded with blanks.

You can then use the 132 bytes of data, which will contain trailing spaces, not parts of the next records as you've done so far.

Probably the LRECL is a red-herring. You've probably just got print lines without trailing spaces.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts 10 byte RBA conversion DB2 2
Search our Forums:

Back to Top