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

SYNCSORT runs, no record is written to the output file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
AshwiniKrish

New User


Joined: 17 Mar 2008
Posts: 6
Location: India

PostPosted: Wed Mar 19, 2008 11:14 am
Reply with quote

My input file is a VSAM ESDS file and it contains PD, binary values, Characters, Alphanumeric Values. And its average record length is 1120.

Based on certains conditions
1) At 33 position, which is PACKED DECIMAL (PD5) type and the values equal to 100150009
2) At 17th position which is also PACKED DECIMAL (PD4) type and the values equal to 309410
3) And at 165 th position which is o binary type (IB2) and the value is "2777"

When the above three conditions are satisfied I need to retreive the entire record and write it to my output file.

I used SORT for the above requrement.

Code:

  SORT FIELDS=COPY                   
  INCLUDE COND=(17,6,PD,EQ,309410,   
            AND,33,9,PD,EQ,10015009,
            AND,165,2,BI,EQ,2777)


Though Sort runs with RC=0, no record is written to the output file.
But I didn't get the expected the results i.e I got an empty file
Back to top
View user's profile Send private message
AshwiniKrish

New User


Joined: 17 Mar 2008
Posts: 6
Location: India

PostPosted: Wed Mar 19, 2008 11:41 am
Reply with quote

To provide more info my SORT abended with U16, when i used the VSAM of Variable format, and write the output in the variable format file.

i got the below error,please help me to solve it and learn it.

Code:

SYSIN :                                                                   
  SORT FIELDS=COPY                                                         
  INCLUDE COND=(17,6,PD,EQ,309410,                                         
              AND,33,9,PD,EQ,100150009,                                   
              AND,165,2,BI,EQ,2403)                                       
WER276B  SYSDIAG= 54830, 268035, 268035, 255830                           
WER164B  8,960K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,         
WER164B     0 BYTES RESERVE REQUESTED, 3,362,536 BYTES USED               
WER146B  4K BYTES OF EMERGENCY SPACE ALLOCATED                             
WER108I  SORTIN   : RECFM=V    ; LRECL=  1720; CISIZE =  4096             
WER110I  SORTOUT  : RECFM=VB   ; LRECL=  1724; BLKSIZE= 27998             
WER410B  5,884K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,   
WER410B     0 BYTES RESERVE REQUESTED, 216K BYTES USED                     
WER055I  INSERT          0, DELETE          0                             
WER250A  INCLUDE/OMIT FIELD BEYOND RECORD                                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                             
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Mar 19, 2008 2:09 pm
Reply with quote

Ashwin,

WER are syncsort messages.

Quote:
INCLUDE COND=(17,6,PD,EQ,309410,
AND,33,9,PD,EQ,10015009,

What is the actual variable lenght in bytes? Dont consider the var value lenght.
Back to top
View user's profile Send private message
AshwiniKrish

New User


Joined: 17 Mar 2008
Posts: 6
Location: India

PostPosted: Wed Mar 19, 2008 3:10 pm
Reply with quote

hi Murali,

The Variable at the position 17 is declared as PD4, and the variable in 33rd position is PD5, and the the binary variable at position 165 is IB2.

Please let me know if u need more information.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 19, 2008 8:00 pm
Reply with quote

Hello,

Please post the DEFINE for the vsam file and the cobol copybook for that file.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Mar 19, 2008 10:09 pm
Reply with quote

AshwiniKrish,

Based on your requirements, you can specify VLTESTI=1 as a runtime parameter to address the WER250A INCLUDE/OMIT FIELD BEYOND RECORD. VLTESTI can be coded as follows:
Code:
//STEP1  EXEC  PGM=SORT,PARM='VLTESTI=1'
or
Code:
//$ORTPARM  DD  *
VLTESTI=1
Back to top
View user's profile Send private message
AshwiniKrish

New User


Joined: 17 Mar 2008
Posts: 6
Location: India

PostPosted: Thu Mar 20, 2008 9:56 am
Reply with quote

Hi Dick,

Please find the details of the VSAM file,

Catalog: ICFCAT.VTSO002
Cluster: 'OLSVS.ACSD1R.GIREC1'
Data: 'OLSVS.ACSD1R.GIREC1.DATA'
Index:
- - - - - - - - - - - - - - - - - - - - - - -
Data Component Information:
Device type: 3390
Organization: ESDS
KSDS key length: 0
KSDS key location: 0
Average record size: 1120
Maximum record size: 1720
Allocated Space: Unit Primary Secondary
Data: CYLINDERS 10 1
Index: 0 0


And the details of the output file are

Management class . . : MTSOSTD1
Storage class . . . : SCTSOSTD
Volume serial . . . : TSO915
Device type . . . . : 3390
Data class . . . . . : DCNULL
Organization . . . : PS
Record format . . . : VB
Record length . . . : 1724
Block size . . . . : 17240
1st extent cylinders: 1
Secondary cylinders : 1
Data set name type :


And the feild which i am using is defined in teh following way in myVSAM file,

FIELD LEVEL/NAME PICTURE FIELD START END length

GIR-C-SUB-NO S9(9) 16 33 37 5
GIR-T-OPERATOR-ID S9(7) 8 17 20 4
GIR-Q-REQUEST(1) S9(4) 65 165 166 2
Back to top
View user's profile Send private message
AshwiniKrish

New User


Joined: 17 Mar 2008
Posts: 6
Location: India

PostPosted: Thu Mar 20, 2008 10:02 am
Reply with quote

hi Alissa,

Thanks for your help,

I ran teh below JCL, with input a file containing 10 records and out of which 2 records satisfy my requirement. Though the job ran successfully without error no record is written to my output dataset. Please advise.

Code:
       
//S010 EXEC PGM=SORT,PARM='VLTESTI=1' 
//SYSOUT      DD   SYSOUT=*
//SORTIN   DD DSN=XYL.EXAMPLE.GIREC3,DISP=SHR           
//SORTOUT  DD DSN=XYL.ABCDEF.EXAMPLE.TEST.GIREC.EST2, 
//            DISP=(,CATLG,DELETE),                     
//            UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)         
//SYSIN DD *                                           
  SORT FIELDS=COPY                                     
  INCLUDE COND=(17,6,PD,EQ,309410,                     
              AND,33,9,PD,EQ,100150009,                 
              AND,165,2,BI,EQ,2403)                     


And SYNSORT messages

SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(17,6,PD,EQ,309410,
AND,33,9,PD,EQ,100150009,
AND,165,2,BI,EQ,2403)
WER108I SORTIN : RECFM=V ; LRECL= 1720; CISIZE = 4096
WER110I SORTOUT : RECFM=VB ; LRECL= 1724; BLKSIZE= 27998
WER055I INSERT 0, DELETE 10
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER054I RCD IN 10, OUT 0
WER169I RELEASE 1.2 BATCH 0453 TPF LEVEL 2.1

The feild definition of the variable i required in teh VSAM file is

FIELD LEVEL/NAME PICTURE FIELD START END length

GIR-C-SUB-NO S9(9) 16 33 37 5
GIR-T-OPERATOR-ID S9(7) 8 17 20 4
GIR-Q-REQUEST(1) S9(4) 65 165 166 2
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Mar 20, 2008 7:22 pm
Reply with quote

Hello,

Quote:
GIR-C-SUB-NO S9(9) 16 33 37 5
GIR-T-OPERATOR-ID S9(7) 8 17 20 4
GIR-Q-REQUEST(1) S9(4) 65 165 166 2
What product uses this definition? I am not familiar with the format/syntax.

From those definitions, how would someone know which kind of numeric data a field contains?

Do the displacements shown in the definitions take into account the 4-byte RDW? If not, you will need to at least add 4 to the start/end positions.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Mar 20, 2008 7:58 pm
Reply with quote

dick scherrer wrote:
Do the displacements shown in the definitions take into account the 4-byte RDW?

This is exactly what I was going to ask based on the difference in LRECL posted in the SyncSort messages for SORTIN and SORTOUT:
Code:
WER108I SORTIN : RECFM=V ; LRECL= 1720; CISIZE = 4096
WER110I SORTOUT : RECFM=VB ; LRECL= 1724; BLKSIZE= 27998

If not, then you may need to modify your control cards as follows:
Code:
INCLUDE COND=(21,6,PD,EQ,309410,
          AND,37,9,PD,EQ,100150009,
         AND,169,2,BI,EQ,2403)
Back to top
View user's profile Send private message
AshwiniKrish

New User


Joined: 17 Mar 2008
Posts: 6
Location: India

PostPosted: Tue Mar 25, 2008 1:00 pm
Reply with quote

Hi

I tried with the below sort card too,

Code:

  SORT FIELDS=COPY                                       
  INCLUDE COND=(21,6,PD,EQ,309410,AND,37,9,PD,EQ,10015009,
              AND,169,2,BI,EQ,2403)                     


Still no record is written to output file.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Mar 25, 2008 7:54 pm
Reply with quote

Hello,

This is very likely because your sort control and your data do not match.

Please post some data (in hex and showing the positions in the record) from one or more records that should be included.

Also, please post your complete jcl and sort control.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top