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
 

 

Time Constant in INCLUDE Condition (SYNCSORT)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Time Constant in INCLUDE Condition (SYNCSORT)
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: 578
Location: USA

PostPosted: Mon Aug 15, 2011 8:19 pm    Post subject:
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    Post subject: Reply to: Time Constant in INCLUDE Condition (SYNCSORT)
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Mon Aug 15, 2011 8:46 pm    Post subject: Reply to: Time Constant in INCLUDE Condition (SYNCSORT)
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Mon Aug 15, 2011 8:51 pm    Post subject: Reply to: Time Constant in INCLUDE Condition (SYNCSORT)
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    Post subject: Reply to: Time Constant in INCLUDE Condition (SYNCSORT)
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    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 CICS transaction slow response time vasanthz All Other Mainframe Topics 1 Thu Jan 19, 2017 1:31 am
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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