View previous topic :: View next topic
Author
Message
Praveen Kumar Kolar New User Joined: 18 Mar 2021Posts: 31 Location: India
Hi Team,
I want to extract the specific fields from the Input file like the "volume name and the use-attribute value" for each tape volume.
Sample of the input:
VOLUME-ENTRY----VAA0000
DATA-VOLUME
LIBRARY-----------PRDVTS RECORDING--------36TRACK ERROR-STATUS---
MEDIA-TYPE--------MEDIA2 USE-ATTRIBUTE----SCRATCH
The input file is variable length record.
Input:
Organization . . . : PS
Record format . . . : VBA
Record length . . . : 133
Block size . . . . : 27998
Output:
Organization . . . : PS
Record format . . . : VBA
Record length . . . : 133
Block size . . . . : 27998
Code:
SORT FIELDS=COPY
INCLUDE COND=(6,12,CH,EQ,C'VOLUME-ENTRY',OR,
71,13,CH,EQ,C'USE-ATTRIBUTE')
OUTREC FIELDS=(1,4,5:22,7,13:88,7)
During the execution of sort program I am getting below error:
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER276B SYSDIAG= 101654, 485967, 485967, 546260
WER164B 18,712K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 32K BYTES RESERVE REQUESTED, 2,484K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VBA ; LRECL= 133; BLKSIZE= 27998
WER073I SORTIN : DSNAME=SECZ1L4.CLG.LISTVOL
WER237I OUTREC RECORD LENGTH = 19
WER110I SORTOUT : RECFM=VBA ; LRECL= 133; BLKSIZE= 27998
WER074I SORTOUT : DSNAME=SECZ1L4.CLG.LISTVOL.OUT
WER462I OUTPUT LRECL DIFFERS FROM SORTOUT LRECL
WER410B 17,684K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE
WER410B 0 BYTES RESERVE REQUESTED, 2,340K BYTES USED
WER055I INSERT 0, DELETE 8
WER244A OUTREC - SHORT RECORD
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Please help me fix this issue.
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1335 Location: Bamberg, Germany
Take notice of this line:
Code:
WER237I OUTREC RECORD LENGTH = 19
You can put a blank char in column 133 to fill up the LRECL.
Btw, there is also a SYNCSORT forum for such questions right below this one for DFSORT.
Back to top
Praveen Kumar Kolar New User Joined: 18 Mar 2021Posts: 31 Location: India
Hi Joerg,
I have created the input and output files without mentioning the DCB parameters and it picked the below attributes.
Input:
Organization . . . : PS
Record format . . . : VBA
Record length . . . : 125
Block size . . . . : 27998
output:
Organization . . . : PS
Record format . . . : VBA
Record length . . . : 125
Block size . . . . : 27998
but even after adding the blank character at 125th column I am getting same error. I am really not sure what I am missing. I am trying to extract the volume name and status of the volumes from listcat.
LISTCAT -
VOLUMEENTRIES(V*) -
LIBRARY(library) -
ALL
Code:
OUTREC FIELDS=(1,4,5:22,7,13:88,7,125:X)
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(6,12,CH,EQ,C'VOLUME-ENTRY',OR,
71,13,CH,EQ,C'USE-ATTRIBUTE')
OUTREC FIELDS=(1,4,5:22,7,13:88,7,125:X)
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER276B SYSDIAG= 94878, 479672, 479672, 546260
WER164B 18,712K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 32K BYTES RESERVE REQUESTED, 2,484K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VBA ; LRECL= 125; BLKSIZE= 27998
WER073I SORTIN : DSNAME=SECZ1L4.CLG.LISTVOL
WER237I OUTREC RECORD LENGTH = 125
WER110I SORTOUT : RECFM=VBA ; LRECL= 125; BLKSIZE= 27998
WER074I SORTOUT : DSNAME=SECZ1L4.CLG.LISTVOL.OUT
WER410B 17,684K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE
WER410B 0 BYTES RESERVE REQUESTED, 2,340K BYTES USED
WER055I INSERT 0, DELETE 8
WER244A OUTREC - SHORT RECORD
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
sergeyken Senior Member Joined: 29 Apr 2008Posts: 2141 Location: USA
Print all record sizes to find out which one is wrong:
Code:
OUTREC BUILD=(1,4,1,2,FI,EDIT=(TTTTT),125:X)
Back to top
Praveen Kumar Kolar New User Joined: 18 Mar 2021Posts: 31 Location: India
Hi Sergeyken,
I did what you mentioned above and the output of sortmsg is,
Code:
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(6,12,CH,EQ,C'VOLUME-ENTRY',OR,
71,13,CH,EQ,C'USE-ATTRIBUTE')
OUTREC BUILD=(1,4,1,2,FI,EDIT=(TTTTT),125:X)
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER276B SYSDIAG= 95486, 480378, 480378, 546260
WER164B 18,712K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 32K BYTES RESERVE REQUESTED, 2,484K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VBA ; LRECL= 125; BLKSIZE= 27998
WER073I SORTIN : DSNAME=SECZ1L4.CLG.LISTVOL
WER237I OUTREC RECORD LENGTH = 125
WER110I SORTOUT : RECFM=VBA ; LRECL= 125; BLKSIZE= 27998
WER074I SORTOUT : DSNAME=SECZ1L4.CLG.LISTVOL.OUT
WER410B 17,684K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE
WER410B 0 BYTES RESERVE REQUESTED, 2,340K BYTES USED
WER055I INSERT 0, DELETE 4882978
WER209B 1,515 PRIMARY AND 3,000 SECONDARY SORTOUT TRACKS ALLOCATED, 3,435 USE
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B SORTIN : EXCP'S=1123,UNIT=3390,DEV=5019,CHP=(38393A3B3C3D3E3F,1),VO
WER416B SORTOUT : EXCP'S=383,UNIT=3390,DEV=501C,CHP=(38393A3B3C3D3E3F,1),VOL
WER416B TOTAL OF 1,506 EXCP'S ISSUED FOR COPYING
WER054I RCD IN 6414748, OUT 1531770
WER169I RELEASE 2.1 BATCH 0539 TPF LEVEL 2.0
WER052I END SYNCSORT - PK$Z1L4I,SORT01,,DIAG=C200,510E,EAA6,00E6,8A5A,6C83,AA
Back to top
Rohit Umarjikar Global Moderator Joined: 21 Sep 2010Posts: 3076 Location: NYC,USA
Don't you need this ?
OR
Code:
EXEC PGM=SORT,PARM='VLTESTI=1'
Back to top
Praveen Kumar Kolar New User Joined: 18 Mar 2021Posts: 31 Location: India
Hi Rohit,
by adding PARM='VLTESTI=1' I am able to retrieve the status of the volume but the volume names are missing in the output.
ommand ===>
***** ****************
00001 SCRATCH
00002 PRIVATE
00003 PRIVATE
00004 PRIVATE
00005 SCRATCH
00006 PRIVATE
00007 SCRATCH
00008 SCRATCH
00009 SCRATCH
00010 SCRATCH
00011 PRIVATE
Am I missing anything in the outrec statement.
Code:
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(6,12,CH,EQ,C'VOLUME-ENTRY',OR,
71,13,CH,EQ,C'USE-ATTRIBUTE')
OUTREC FIELDS=(1,4,5:22,7,13:88,7,125:X)
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER276B SYSDIAG= 93526, 479248, 479248, 546260
WER164B 18,712K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 32K BYTES RESERVE REQUESTED, 2,484K BYTES USED
WER146B 12K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=VBA ; LRECL= 125; BLKSIZE= 27998
WER073I SORTIN : DSNAME=SECZ1L4.CLG.LISTVOL
WER237I OUTREC RECORD LENGTH = 125
WER110I SORTOUT : RECFM=VBA ; LRECL= 125; BLKSIZE= 27998
WER074I SORTOUT : DSNAME=SECZ1L4.CLG.LISTVOL.OUT
WER410B 17,684K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE
WER410B 0 BYTES RESERVE REQUESTED, 2,340K BYTES USED
WER055I INSERT 0, DELETE 5648863
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B SORTIN : EXCP'S=1123,UNIT=3390,DEV=5019,CHP=(38393A3B3C3D3E3F,1),VO
WER416B SORTOUT : EXCP'S=192,UNIT=3390,DEV=501C,CHP=(38393A3B3C3D3E3F,1),VOL
WER416B TOTAL OF 1,315 EXCP'S ISSUED FOR COPYING
WER054I RCD IN 6414748, OUT 765885
WER169I RELEASE 2.1 BATCH 0539 TPF LEVEL 2.0
WER052I END SYNCSORT - PK$Z1L4I,SORT01,,DIAG=8C00,530A,A02E,006C,C4D2,68A3,26
Back to top
sergeyken Senior Member Joined: 29 Apr 2008Posts: 2141 Location: USA
It MUST be so trivial:
0) start testing on 10-50 input records, not on 50000-500000000 of them (add STOPAFT=50)
1) verify only your INCLUDE statement: delete OUTREC, and check if all required records are selected?
2) when (1) is done, add also OUTREC, and verify if correct parts of selected records are printed/saved?
Looks like it is the first program code in your life, isn’t it?
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1335 Location: Bamberg, Germany
Praveen Kumar Kolar wrote:
..by adding PARM='VLTESTI=1' I am able to retrieve the status of the volume but the volume names are missing in the output.
Try also with PARM='VLTESTI=2' once more.
Back to top
Praveen Kumar Kolar New User Joined: 18 Mar 2021Posts: 31 Location: India
Hi Joerg,
I tried with PARM='VLTESTI=2' for just 50 records. The sort competed successfully but the volume names are missing in the output.
As sergeyken mentioned I have removed the outrec and just tried with the include statement but still the volume name are missing from output.
with any single include condition it working fine but with multiple condition I am not getting the expected results.
Code:
SORT FIELDS=COPY,STOPAFT=50
INCLUDE COND=(6,12,CH,EQ,C'VOLUME-ENTRY')
output:
0VOLUME-ENTRY----VAA0000
0VOLUME-ENTRY----VAA0001
0VOLUME-ENTRY----VAA0002
0VOLUME-ENTRY----VAA0003
0VOLUME-ENTRY----VAA0004
SORT FIELDS=COPY,STOPAFT=50
INCLUDE COND=(6,13,CH,EQ,C'VOLUME-ENTRY',OR,
71,13,CH,EQ,C'USE-ATTRIBUTE')
output:
[img]
File Edit Edit_Settings Menu Utilities Compilers Test Help
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
VIEW SECZ1L4.CLG.LISTVOL.OUT Columns 00001 00072
Command ===> Scroll ===> CSR
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
****** ***************************** Top of Data ******************************
000001 MEDIA-TYPE--------MEDIA2 USE-AT
000002 MEDIA-TYPE--------MEDIA2 USE-AT
000003 MEDIA-TYPE--------MEDIA2 USE-AT
000004 MEDIA-TYPE--------MEDIA2 USE-AT
000005 MEDIA-TYPE--------MEDIA2 USE-AT
000006 0 MEDIA-TYPE--------MEDIA2 USE-AT
000007 MEDIA-TYPE--------MEDIA2 USE-AT
000008 MEDIA-TYPE--------MEDIA2 USE-AT
000009 MEDIA-TYPE--------MEDIA2 USE-AT
000010 MEDIA-TYPE--------MEDIA2 USE-AT
000011 MEDIA-TYPE--------MEDIA2 USE-AT
000012 MEDIA-TYPE--------MEDIA2 USE-AT
000013 MEDIA-TYPE--------MEDIA2 USE-AT
000014 MEDIA-TYPE--------MEDIA2 USE-AT
000015 MEDIA-TYPE--------MEDIA2 USE-AT
F1=Help F2=Split F3=Exit F4=Expand F5=Rfind F6=Rchange
F7=Up F8=Down F9=Swap F10=Left F11=Right F12=Cancel
-STATUS *DSLIST
[/img]
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1335 Location: Bamberg, Germany
And last version to try (this one works with PARM='VLTESTI=2'):
Code:
OPTION COPY
INCLUDE COND=(6,12,CH,EQ,C'VOLUME-ENTRY',OR,
71,13,CH,EQ,C'USE-ATTRIBUTE')
OUTREC IFTHEN=(WHEN=INIT,BUILD=(1,4,5:22,7,13:88,7,125:X))
END
Back to top
Rohit Umarjikar Global Moderator Joined: 21 Sep 2010Posts: 3076 Location: NYC,USA
Back to top
Praveen Kumar Kolar New User Joined: 18 Mar 2021Posts: 31 Location: India
Hi Joerg,
Thank you very much. It worked. I just added one more statement to get everything in one column.
@Rohit, Sure but I did some research before posting here and I hope its not sufficient. Thank you for your words.
[/code]
OPTION COPY
OUTREC FIELDS=(1,4,5,15,JFY=(SHIFT=LEFT))
Back to top
Please enable JavaScript!