kedianirmal
New User
Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
|
|
|
|
Hi,
I have a variable block file of lenght 8264, which contains three three type of records:
Header length 48
Trailer Lenght 28
Data record lenght 8264.
The detail record is divided in four parts:
Length: 153 3500 3500 1100 7 (8260 + 4(VB file))
Record Data1 Array1 Array2 Array3 Data
I have to cut the file as follows:
Length: 153 2000 2000 1100 7 (5260 + 4(VB file))
Record Data1 Array1 Array2 Array3 Data
The array3 is not fully filled and hence can have any lenght of data the array variable is Pic X(11) .
Can somebody help how can i achieve this.
Thanks,
Nirmal |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use a DFSORT job like the following to do what you asked for:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB/8264)
//SORTOUT DD LRECL=5264,DSN=... output file (VB/5264)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,2,BI,GT,48),
BUILD=(1,4,5,153,158,2000,3658,2000,7158))
/*
|
|
|