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

Time Constant in INCLUDE Condition (SYNCSORT)


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

New User


Joined: 07 Oct 2005
Posts: 4
Location: maryland

PostPosted: Mon Aug 15, 2011 8:12 pm
Reply with quote

Hi,

Using SYNCSORT FOR Z/OS 1.3.2.0R, I am trying to OVERLAY (also tried BUILD) the time constant into the input data using INREC.

Code:

//SORT001  EXEC PGM=SORT                                           
//SORTIN   DD *                                                     
ACECTEST11                                                         
BCECPROD22                                                         
CDB2TEST33                                                         
DDB2PROD44                                                         
EIMSTEST55                                                         
FIMSPRODG6                                                         
//SORTOUT  DD DSN=OUTPUT.FILE1,                         
//           DISP=(,CATLG,DELETE),UNIT=SYSDA,                       
//           DCB=(RECFM=FBA,LRECL=81),SPACE=(TRK,(1,1),RLSE)       
//SYSOUT   DD SYSOUT=*                                             
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                 
  INREC OVERLAY=(11:TIME3)                                         
  OUTREC FIELDS=(1,12)                                             
/*                                                                 


This control card OVERLAYs/BUILDs fine, but when I tried to add an include statement, it fails to get that time value (TIME3 = C'hh').

Example:
Code:

//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                 
  INREC OVERLAY=(11:TIME3)               
  INCLUDE COND=(11,2,CH,EQ,C'10')                         
  OUTREC FIELDS=(1,12)                                             
/*                                                                 
 


HEX display after OVERLAY (TIME3 = 10 for 10AM):
Code:

000001 ACECTEST1110                                                           
       CCCCECEEFFFF000000000000000000000000000000000000000000000000000000000000
       135335231110000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
000002 BCECPROD2210                                                           
       CCCCDDDCFFFF000000000000000000000000000000000000000000000000000000000000
       235379642210000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
000003 CDB2TEST3310                                                           
       CCCFECEEFFFF000000000000000000000000000000000000000000000000000000000000
       342235233310000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
...


What should be the correct INCLUDE Condition statement to be able to read the TIME value? (Or is TIME constant OK to use in this context?)

Thanks!
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Mon Aug 15, 2011 8:19 pm
Reply with quote

jdriley,
I don't have Syncsort but if my guess is correct, INCLUDE COND is processed before INREC (OVERLAY or BUILD). So your new sort card is INCLUDing condition before TIME3 is populated and won't produce required results.

Try something like below (Untested)...
Code:
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                 
  INREC OVERLAY=(11:TIME3)               
  OUTFIL INCLUDE=(11,2,CH,EQ,C'10'),BUILD=(1,12)                                             
/*

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

New User


Joined: 07 Oct 2005
Posts: 4
Location: maryland

PostPosted: Mon Aug 15, 2011 8:33 pm
Reply with quote

Oh, how about that! That was quick. :-) Just tested. Works like a charm.

Thank you!
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 15, 2011 8:46 pm
Reply with quote

If you consult your manual you'll find what order the different types of sort card are actually processed in. The position of include/omit for instance, is irrelevant to the processing, it will always be actioned at the same stage. Try putting it as the last sort card, it'll still include/omit as early as possible to cut down on the amount of data procesed.

You're loosing out on that process because you have the unusual situation of selecting on something which is not on the input file.

I don't really understand why you are doing what you are doing, but I don't have to!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Aug 15, 2011 8:51 pm
Reply with quote

Quote:
I don't really understand why you are doing what you are doing, but I don't have to!

neither do I...

the end result will be an all or nothing file!
but as long as the TS is happy we are happy! icon_cool.gif
Back to top
View user's profile Send private message
jdriley

New User


Joined: 07 Oct 2005
Posts: 4
Location: maryland

PostPosted: Mon Aug 15, 2011 9:20 pm
Reply with quote

Thanks for all the additional information. And yes, I am happy. :-)

And just to add a background, our Ops team have this existing sort job scheduled to run every hour that sends out an alert if it gets something out of it and for SOME reason they don't what to change the existing schedule and just change the sort parm to NOT to get anything on specific hours(s).

So, they where wondering if we can just to add the RUN time as a condition on the SORT.

As trivial as it may seem, I was thinking that the reason that they don't want to go through the 'pain' of requesting a schedule change is because it takes several approvals and 2 weeks to change a job schedule. [bummer]

Thanks again and I appreciate all your input.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
Search our Forums:

Back to Top