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

Sort include cond


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

New User


Joined: 29 Dec 2008
Posts: 37
Location: india

PostPosted: Thu Mar 25, 2010 10:41 pm
Reply with quote

Hi,

This is the job step :

Code:
//S02 EXEC PGM=SORT                                             
//SYSOUT   DD  SYSOUT=*                                         
//SORTMSG  DD  SYSOUT=*                                         
//SORTIN DD DSN=ABC.DEF.123,DISP=SHR           
//SORTOUT DD DSN=ABC.DEF.234,                 
//           DISP=SHR                                           
//SYSIN DD *                                                   
  SORT FIELDS=COPY                                             
  INCLUDE COND=(6,07,CH,EQ,C'NONVSAM')                         
  OUTFIL OUTREC=(C' DELETE ',12:21,36),CONVERT                 
//*                                                             

Here include cond means that starting location is 6 and length of 7 should match 'NONVSAM' string.

When I am opening PS file(ABC.DEF.123) in view/Edit mode i am seeing this ..

Code:
Command ===>                                                  Scroll ===> CSR 
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000006 0NONVSAM ------- XXX.123.LONG.GDG100.G0001V00             
000007       IN-CAT --- UCAT.TSO                                               
000008 0NONVSAM ------- XXX.123.LONG.GDG100.G0002V00             
000009       IN-CAT --- UCAT.TSO   

Isn't the starting position for 'NONVSAM' here is column 2 ? But the INCLUDE COND=(6,07,CH,EQ,C'NONVSAM') working perfectly fine. Am i reading the input column number incorrectly?

Please correct me.

Thanks,
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Mar 25, 2010 10:56 pm
Reply with quote

Quote:
Isn't the starting position for 'NONVSAM' here is column 2 ? But the INCLUDE COND=(6,07,CH,EQ,C'NONVSAM') working perfectly fine. Am i reading the input column number incorrectly?
If the PS file were actually VB rather than FB, the 6 for 7 makes sense.....
Back to top
View user's profile Send private message
kapil dev arora

New User


Joined: 29 Dec 2008
Posts: 37
Location: india

PostPosted: Thu Mar 25, 2010 11:00 pm
Reply with quote

Here are the PS file properties. Can you please tell me how to read column number from input files. How '6 for 7 makes sense'. What will be the first column then ?

General Data
Management class . . : MCTEST
Storage class . . . : SCTEST
Volume serial . . . : TST007 +
Device type . . . . : 3390
Data class . . . . . : DCEXTDEF
Organization . . . : PS
Record format . . . : VBA
Record length . . . : 240
Block size . . . . : 3120
1st extent blocks . : 180
Secondary blocks . : 500
Data set name type : EXTENDED
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Mar 25, 2010 11:25 pm
Reply with quote

A VBA file has an RDW (in positions 1-4), a carriage control character (in position 5) and then the data (starting in position 6).

View does not show you the RDW - it starts with the carriage control character (e.g. '0').

As far as DFSORT is concerned, 'NONVSAM' is the first data byte which starts in position 6.
Back to top
View user's profile Send private message
kapil dev arora

New User


Joined: 29 Dec 2008
Posts: 37
Location: india

PostPosted: Fri Mar 26, 2010 12:47 am
Reply with quote

That was really good information. Thanks :-)
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 How to split large record length file... DFSORT/ICETOOL 8
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top