|
View previous topic :: View next topic
|
| Author |
Message |
isssal
New User
Joined: 29 Oct 2016 Posts: 1 Location: usa
|
|
|
|
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 |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
| 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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|