View previous topic :: View next topic
|
Author |
Message |
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Hi all,
I am working on some tutorials of SYNCSORT.
I am looking in to all the dates and time formats supported by SYNCSORT.
Presently I am using the following code (X) to introduce 2spaces between each format.
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1,6,X,DATE1,2X,TIME1,2X,DATE2,2X,DATE3) |
I want to write each format in a different line..As a different record in the SORTOUT file.
Also while using this I cannot have a empty SORTIN file and hence I have to give some random record.Can this be avoided? |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
show the required output and input you are using.
what is RECFM\LRECL of input\output files. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Not tested, but instead of 2X try / . . . |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Sambhaji,
No I/P file being used. I have just added a dummy record 123456 in the SORTIN DD card statement.
O/P is SYSOUT
Dick,
I had already tried '/' but even that is not working. I get syntax error at that point. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
you should post all job output to get better response, the problem is you cannot use the '/' with OUTREC.
Try this
Code: |
//SORT0001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
123456
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL BUILD=(1,6,/,DATE1,/,TIME1,/,DATE2,/,DATE3)
/* |
Gerry |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Thanks,
This is working fine |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Sorry, to continue on this topic....
This time I am using an input file
Code: |
Organization . . . : PS
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 800 |
And an output file
Code: |
Organization . . . : PS
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 800 |
with the contents of Input file as
Code: |
----+----1----+----2----+----3
DATE :
DATE1 :
DATE1(-) :
DATE2 :
DATE2(-) :
DATE3 :
DATE4 :
DATE(DMY-) :
DATE(DM4-) :
DATENS=(4DM) : |
How do I code in the JCL using SYNCSORT in which I get output as
Code: |
----+----1----+----2----+----3----+----4
DATE : 05/18/10
DATE1 : 20100518
DATE1(-) : 2010-05-18
DATE2 : 201005
DATE2(-) : 2010-05
DATE3 : 2010138
DATE4 : 2010-05-18-03.21.52
DATE(DMY-) : 18-05-10
DATE(DM4-) : 18-05-2010
DATENS=(4DM) : 20101805 |
Also I tried out
Code: |
SORT FIELDS=COPY
OUTFIL BUILD=(1,17,2X,DATE,/, *
1,17,2X,DATE1,1/, *
1,17,2X,DATE1(-),1/, *
1,17,2X,DATE2,1/, *
1,17,2X,DATE2(-),1/, *
1,17,2X,DATE3,1/, *
1,17,2X,DATE4,1/, *
1,17,2X,DATE(DMY-),1/, *
1,17,2X,DATE(DM4-),1/, *
1,17,2X,DATENS=(4DM)) |
But somewhere I am going wrong and i get
Code: |
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 800
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 800
WER247A SORTOUT HAS INCOMPATIBLE LRECL |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Change SORTOUT to a proper lrecl or force the data to be 80 . . . |
|
Back to top |
|
|
|
|