|
|
| Author |
Message |
himantgoyal Warnings : 1 New User
Joined: 14 Aug 2006 Posts: 8
|
|
|
|
Hi ,
Could anyone please help me , How I can retrieve system date in Sort JCl in MMDDYY format
My control card is
SORT FIELDS=COPY
OUTREC FIELDS(1,44,date)
1-44 is data from input file. |
|
| Back to top |
|
 |
References
|
Posted: Thu Jul 10, 2008 1:15 pm Post subject: Re: Syncsort How to take system date in sort jcl - MMDDYY format |
 |
|
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1706 Location: Mumbai, India
|
|
|
|
Hi,
Try this
| Code: |
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(DATE=(MD4-))
/* |
|
|
| Back to top |
|
 |
himantgoyal Warnings : 1 New User
Joined: 14 Aug 2006 Posts: 8
|
|
|
|
| Using above ,date is coming in 07-10-2008 format . I want in 071008 (MMDDYY) format |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1706 Location: Mumbai, India
|
|
|
|
Hi,
Ok, before I go ahead with some other suggestion, one more thing to know, why did you show
| Quote: |
| OUTREC FIELDS(1,44,date) |
in your example ? I didn't get it. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4236 Location: San Jose, CA
|
|
|
|
himantgoyal,
DATENS=(MDY) in TRAILER1 will give you an 'mmddyy' date.
But if you want the 'mmddyy' date to replace date in your OUTREC statement, you can use a DFSORT job like this:
| Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
TDATE,S'&DAY.&MON.&YR2'
/*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,44,TDATE)
/*
|
|
|
| Back to top |
|
 |
Vasukip
New User
Joined: 17 Jun 2008 Posts: 41 Location: Chennai
|
|
|
|
Frank,
I tried this control Statement - SYMNAMES with String I'm getting user abend.
fyi,
| Code: |
SYNCSORT FOR Z/OS 1.2.2.1R U.S. PATENTS:
* P
PRODUCT LICENSED FOR CPU SERIAL NUMBER AC56E,
*** ERRORS IN SYMNAMES STATEMENTS ***
TDATE,S'&DAY.&MON.&YR2'
*
*** SYNTAX ERROR ***
WER470A SYMNAMES ERRORS FOUND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
|
|
| Back to top |
|
 |
Moved: Fri Jul 11, 2008 8:38 pm by dick scherrer From DFSORT/ICETOOL to JCL |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7517 Location: 221 B Baker St
|
|
|
|
Hello,
You system is running Syncsort rather than DFSORT. |
|
| Back to top |
|
 |
Anuj D.
Senior Member
Joined: 22 Apr 2006 Posts: 1706 Location: Mumbai, India
|
|
|
|
Hi,
| Vasukip wrote: |
| I tried this control Statement - SYMNAMES with String I'm getting user abend. |
Support for SYMNAMES is available in 1.3 onwards releases of SyncSort, You are using little earlier version (from the SYSOUT you posted in earlier post)
| Code: |
| SYNCSORT FOR Z/OS 1.2.2.1R U.S. PATENTS: |
so the error was there.
Again, do you want the 'mmddyy' date to replace date in your OUTREC statement ? or would this suffice
| Code: |
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(DATENS=(MDY))
/* |
|
|
| Back to top |
|
 |
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 200 Location: USA
|
|
|
|
Here are 2 possible solutions:
| Code: |
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=input.file
//SORTOUT DD DSN=output.file
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(INIT),
BUILD=(1,44,&DATE)),
IFTHEN=(WHEN=(47,1,CH,EQ,C'/'),
BUILD=(1,44,45,2,48,2,51,2))
/* |
| Code: |
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=input.file
//SORTOUT DD DSN=output.file
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INREC FIELDS=(1,44,&DATE)
SORT FIELDS=COPY
OUTREC FIELDS=(1,44,45,2,48,2,51,2)
/* |
|
|
| Back to top |
|
 |
|
|
|