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
 

 

Comparing timestamp in Synscort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Wed Jan 20, 2016 4:47 pm    Post subject: Comparing timestamp in Synscort
Reply with quote

Hi ,

I have to compare timestamp from a PS file and based on the condition greater (current tmstamp - 1 ) We have to write records to the output file . we are using syncsort and we don't have DFsort. What is the equivalent of DATE5 in Synscsort ,Below is the sort card I am using .

file 1 Timestamp position - starting position 216

//JS111 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=ACSTN&LVL..UNL.INSTALL.LOAN.SYSREC4
//SORTOUT DD DSN=ACSTN&LVL..INST.LOAN.STATUS.TEMP,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,BLKSIZE=0,DSORG=PS),
// UNIT=SYSDA,SPACE=(CYL,(02,05),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(216,26,CH,GT,&DATE5-1)
/*
//*
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Jan 20, 2016 4:48 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

What does your documentation say? What version of SyncSORT do you have?
Back to top
View user's profile Send private message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Wed Jan 20, 2016 5:49 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

Hi Bill,

Thanks for the response

When I checked the run JCL it gives the below version

SYNCSORT FOR Z/OS 2.1.0

Regards,
L.Nethaji
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Jan 20, 2016 6:02 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

Well, that looks pretty-much up-to-date. And your documentation? Did you try the DATE5 just in case? Did you find out how to ask SyncSORT? They have a Community on their website where you can ask, for instance.
Back to top
View user's profile Send private message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Wed Jan 20, 2016 6:44 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

Hi Bill,

I tried DATE5 as like in the JCL.
No rows are moved to output although the jcl ended successfully its giving "command line error "

I don't have the documentation with me .

Regards,
L.Nethaji
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Jan 20, 2016 6:54 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

Can you paste the output from the step? You need to get hold of the documentation.
Back to top
View user's profile Send private message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Wed Jan 20, 2016 6:58 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

Hi Bill,

To check DATE5 works fine I was trying the below JCL


//JS111 EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=ACSTN&LVL..UNL.INSTALL.LOAN.SYSREC4
//SORTOUT DD DSN=ACSTN&LVL..INST.LOAN.STATUS.TEMP,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,BLKSIZE=0,LRECL=333),
// UNIT=SYSDA,SPACE=(CYL,(02,05),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(216,26,CH,GT,&DATE5)


OUTPUT:-

SYNCSORT LICENSED FOR VERIZON WIRELESS
SYSIN :
JOINKEYS FILE=F1,FIELDS=(1,11,A)
JOINKEYS FILE=F2,FIELDS=(1,11,A)
OPTION COPY
REFORMAT FIELDS=(F1:1,32,F2:12,54,F1:33,183)
INCLUDE COND=(216,26,CH,GT,&DATE5-1)
OUTREC FIELDS=(1:1,269)
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER276B SYSDIAG= 908663, 7685226, 7685226, 29181330
WER164B 16,516K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 1,195,296 BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER481I JOINKEYS REFORMAT RECORD LENGTH= 269, TYPE = F
WER237I OUTREC RECORD LENGTH = 269
WER110I SORTOUT : RECFM=FB ; LRECL= 269; BLKSIZE= 32549
WER074I SORTOUT : DSNAME=ACSTNS1.INST.LOAN.STATUS.TEMP
WER410B 15,488K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER410B 0 BYTES RESERVE REQUESTED, 188K BYTES USED
WER055I INSERT 0, DELETE 14217
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B BSAM WAS USED FOR SORTOUT
WER054I RCD IN 14217, OUT 0
WER072I NOEQUALS, BALANCE IN EFFECT
WER169I RELEASE 2.1 BATCH 0539 TPF LEVEL 0.0
WER482I JNF1 STATISTICS
WER483B 3,912K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 3,144K BYTES USED
WER108I SORTJNF1 : RECFM=FB ; LRECL= 241; BLKSIZE= 27956
WER073I SORTJNF1 : DSNAME=ACSTNS1.UNL.INSTALL.LOAN.SYSREC4
WER483B 2,880K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER483B 0 BYTES RESERVE REQUESTED, 2,880K BYTES USED
WER483B G=2077,B=231,BIAS=99
WER483B 0 PREALLOCATED SORTWORK TRACKS, 150 DYNAMICALLY ALLOCATED,
WER483B 0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL 95 TRACKS USED
WER484I SORTJNF1 : RCD IN= 14217,OMITTED= 0,PAIRED= 14217,UNPAIRED= 0
WER416B BSAM WAS USED FOR SORTJNF1
WER416B JNF1WK01 : EXCP'S=44,UNIT=3390,DEV=3AB1,CHP=CCDA8B75E5B0A562,VOL=FTM01
WER416B JNF1WK02 : EXCP'S=39,UNIT=3390,DEV=3CB0,CHP=CCDA8B75E5B0A562,VOL=FTM01
WER416B TOTAL OF 83 EXCP'S ISSUED FOR SORTWORKS
WER487I FILESIZE 3,426,297 BYTES
WER482I JNF2 STATISTICS
WER483B 12,164K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 11,388K BYTES USED
WER108I SORTJNF2 : RECFM=FB ; LRECL= 91; BLKSIZE= 27937
WER073I SORTJNF2 : DSNAME=ACSTNS1.INST.LOAN.STATUS.SYSREC2
WER483B 11,132K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER483B 0 BYTES RESERVE REQUESTED, 11,124K BYTES USED
WER483B G=42279,B=596,BIAS=94
WER483B 0 PREALLOCATED SORTWORK TRACKS, 45,000 DYNAMICALLY ALLOCATED,
WER483B 0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL 18,845 TRACKS USED
WER484I SORTJNF2 : RCD IN= 9850780,OMITTED= 0,PAIRED= 14217,UNPAIRED= 9836563
WER416B BSAM WAS USED FOR SORTJNF2
WER416B JNF2WK01 : EXCP'S=846,UNIT=3390,DEV=38B8,CHP=CCDA8B75E5B0A562,VOL=FTM0
WER416B JNF2WK02 : EXCP'S=638,UNIT=3390,DEV=32A5,CHP=CCDA8B75E5B0A562,VOL=FTM0
WER416B JNF2WK03 : EXCP'S=636,UNIT=3390,DEV=37BA,CHP=CCDA8B75E5B0A562,VOL=FTM0
WER416B JNF2WK04 : EXCP'S=639,UNIT=3390,DEV=37A4,CHP=CCDA8B75E5B0A562,VOL=FTM0
WER416B JNF2WK05 : EXCP'S=630,UNIT=3390,DEV=33B8,CHP=CCDA8B75E5B0A562,VOL=FTM0
WER416B JNF2WK06 : EXCP'S=753,UNIT=3390,DEV=3FB0,CHP=CCDA8B75E5B0A562,VOL=FTM0
WER416B TOTAL OF 4,142 EXCP'S ISSUED FOR SORTWORKS
WER487I FILESIZE 896,420,980 BYTES
WER052I END SYNCSORT - ACST910J,JS111,,DIAG=8200,404A,AA80,0066,CA7E,6CE3,2AC8
WER052I DIAG1=8A00,40DA,A290,2466,C36E,6CC3,2240,0C64
WER052I DIAG2=E000,EA51,C890,AC44,A97E,4CEB,0240,A664


Regards,
L.Nethaji
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Jan 20, 2016 8:02 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

There is no connection between the Control Cards you have shown and the output you have shown.

To see if DATE5 is doing what you hope (and it would seem there's a good chance, since it has not shown up as an error) run this:
Code:

//SHOWDAT5 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY,STOPAFT=1
                       
  INREC BUILD=(DATE5)
//SORTIN   DD *
DOES NOT MATTER


That should print the 26-character datestamp of the current time at which the step started.

As to your JOINKEYS, are you sure the data is not already in order? For one or other input? You should at least use JNF1CNTL to do the INCLUDE anyway.
Back to top
View user's profile Send private message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Wed Jan 20, 2016 8:21 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

Hi Bill,

I was getting the timestamp 2016-01-20-09.45.22.514418

when I ran the job which you have given.

sorry my bad I pasted the wrong JCL in my previous post.

This is the JCL I submitted

//JS111 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTJNF1 DD DISP=SHR,DSN=ACSTN&LVL..UNL.INSTALL.LOAN.SYSREC4
//SORTJNF2 DD DISP=SHR,DSN=ACSTN&LVL..INST.LOAN.STATUS.SYSREC2
//SORTOUT DD DSN=ACSTN&LVL..INST.LOAN.STATUS.TEMP,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,BLKSIZE=0,DSORG=PS),
// UNIT=SYSDA,SPACE=&SPC1
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,11,A)
JOINKEYS FILE=F2,FIELDS=(1,11,A)
OPTION COPY
REFORMAT FIELDS=(F1:1,32,F2:12,54,F1:33,183)
INCLUDE COND=(216,26,CH,GT,&DATE5)
OUTREC FIELDS=(1:1,269)

Its working good now ..Thanks a lot bill .

Regards,
L.Nethaji
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Wed Jan 20, 2016 9:07 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

OK, but is your data already in key order?

Even if not, you can do the INCLUDE earlier (in JNF1CNTL) to avoid SORTing records you later exclude. Your OUTREC FIELDS is an entire waste, all it does is copy bytes 1.269 to 1,269.
Back to top
View user's profile Send private message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Thu Jan 21, 2016 3:05 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

Hi Bill,

I was using the below DFSORT .But &DATE5-1 is not working properly.
OUTREC I just want records from 01 till 269



//JS111 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTJNF1 DD DISP=SHR,DSN=ACSTN&LVL..UNL.INSTALL.LOAN.SYSREC4
//SORTJNF2 DD DISP=SHR,DSN=ACSTN&LVL..INST.LOAN.STATUS.SYSREC2
//SORTOUT DD DSN=ACSTN&LVL..INST.LOAN.STATUS.SAI6,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,BLKSIZE=0,DSORG=PS),
// UNIT=SYSDA,SPACE=&SPC1
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,11,A)
JOINKEYS FILE=F2,FIELDS=(1,11,A)
OPTION COPY
REFORMAT FIELDS=(F1:1,32,F2:12,54,F1:33,183)
INCLUDE COND=((216,26,CH,GT,&DATE5-1),OR,(66,26,CH,GT,&DATE5-1))
OUTREC FIELDS=(1:1,269)

I had the below timestamp for one of the input files
2016-01-21-13.00.08.583622 .But still its not getting to the output file.

Please help me to resolve this issue.

Regards,
L.Nethaji
Back to top
View user's profile Send private message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Thu Jan 21, 2016 3:29 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

Bill,

ITs working now.

I gave the reformat fields wrongly.

Regards,
L.Nethaji
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Thu Jan 21, 2016 3:50 pm    Post subject: Reply to: Comparing timestamp in Synscort
Reply with quote

OK, you're ignoring my questions. I'm suggesting the strong likelihood of considerable savings in resources in your Control Cards, and you've got some rubbish for sure which is entirely pointless. If you are unconcerned by this, fair enough, but don't come moaning here if the client spots it.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1714
Location: UK

PostPosted: Thu Jan 21, 2016 4:03 pm    Post subject:
Reply with quote

Quote:
I was using the below DFSORT

But your messages indicate that you are using SYNCSORT and you posted in the SYNCSORT part of the forum.
Also, after this many years on the forum you should know how to use the code tags to present your code, JCL and data.
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Converting EBCDIC to Unicode (TimeStamp) muralikrishnan_new COBOL Programming 2 Mon Jul 25, 2016 10:42 pm
No new posts comparing comp-3 and unpacked numbers juares castro COBOL Programming 3 Mon May 30, 2016 6:46 pm
No new posts Convert Timestamp Value mrdinesh DFSORT/ICETOOL 7 Thu May 05, 2016 6:01 pm
No new posts Need help on comparing hexadecimal va... ashok_uddaraju DFSORT/ICETOOL 4 Thu Apr 28, 2016 2:08 am


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