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

INREC OVERLAY using Syncsort giving errorneous result


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

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Tue Nov 30, 2010 6:10 am
Reply with quote

Dear Listers,

When trying to execute the following:
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
MYDAY,S'&WDAY'
//SORTIN DD DSN=PUBLIC.TEST.INPUT.FILE01,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC OVERLAY=(20:MYDAY)
//*

I get a wrong "Day of the Week". I ran on Monday and it gives TUE. I can vouch it returned the right day earlier. Any suggestions?

Code:
 SYNCSORT LICENSED FOR CPU SERIAL NUMBER 52655, MODEL 2097 710             LIC
 SYSIN :                                                                     
   SORT FIELDS=COPY                                                           
   INREC OVERLAY=(20:MYDAY)                                                   
 DATA DICTIONARY SYMBOLS SUBSTITUTED :                                       
 SORT FIELDS=COPY                                                             
 INREC OVERLAY=(20:C'TUE')                                                   
 WER276B  SYSDIAG= 78243, 2292019, 2292019, 5332800                           
 WER164B  8,608K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
 WER164B     0 BYTES RESERVE REQUESTED, 2,240K BYTES USED                     
 WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                             
 WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920               
 WER257I  INREC RECORD LENGTH =    80                                         
 WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920               
 WER410B  7,848K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
 WER410B     0 BYTES RESERVE REQUESTED, 2,116K BYTES USED                     
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000     
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
 WER416B  SORTIN   : EXCP'S=1,UNIT=3390,DEV=E524,CHP=(7A7B7879,2),VOL=DVL117   
 WER416B  BSAM WAS USED FOR SORTOUT                                             
 WER054I  RCD IN          1, OUT          1                                     
 WER169I  RELEASE 1.3 BATCH 0506 TPF LEVEL 2.1                                 
 WER052I  END SYNCSORT - KC02628S,STEP0100,,DIAG=AE00,7104,822C,004E,E6D2,488B,0
2010-11-280        TUE                                                         
******************************** BOTTOM OF DATA ********************************
                           
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Nov 30, 2010 6:28 am
Reply with quote

If your site is using UMT instead of local time, accessing the current day would give different results for several hours of the UMT offset.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 30, 2010 8:12 am
Reply with quote

One reason why I always use the local date/time variables, i.e. LWDAY.
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Tue Nov 30, 2010 8:57 am
Reply with quote

Quote:

One reason why I always use the local date/time variables, i.e. LWDAY


So should I change the INREC OVERLAY=(20:MYDAY) to INREC OVERLAY=(20:LWDAY)? I am not sure if I am missing something.
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Tue Nov 30, 2010 9:00 am
Reply with quote

Quote:
If your site is using UMT instead of local time, accessing the current day would give different results for several hours of the UMT offset.


How do I check that ? How do I check what format of time my site is using?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Nov 30, 2010 9:59 am
Reply with quote

Raymond Sachs wrote:
So should I change the INREC OVERLAY=(20:MYDAY) to INREC OVERLAY=(20:LWDAY)? I am not sure if I am missing something.
Raymond,

Inorder to access local date, change the symbol &WDAY to &LWDAY
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 Nov 30, 2010 9:59 am
Reply with quote

Hello,

Instead of S'&WDAY' try S'&LWDAY'.

I have no connection to my "docs" tonight, so i haven't verified this.

Quote:
How do I check what format of time my site is using?
Whoever supports the product should be able to tell you.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 30, 2010 2:13 pm
Reply with quote

www.ibmmainframes.com/viewtopic.php?t=52178&highlight=tghe
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 30, 2010 5:56 pm
Reply with quote

You can check here for the list of standard dynamic system variables: publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E241/2.2.2
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Wed Dec 01, 2010 4:41 am
Reply with quote

Thanks all for your help. It worked.
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 Dec 01, 2010 9:00 am
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
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 only first records of the fil... SYNCSORT 7
No new posts first column truncated in search result IBM Tools 13
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts executing XCTL command in COBOL witho... CICS 10
No new posts CSQBGET - Call giving completion code... COBOL Programming 3
Search our Forums:

Back to Top