Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort include cond

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Sort include cond
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: 2150
Location: At my coffee table

PostPosted: Thu Mar 25, 2010 10:56 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Mar 25, 2010 11:25 pm    Post subject:
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    Post subject: Reply to: Sort include cond
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us