View previous topic :: View next topic
|
Author |
Message |
hiravibk Warnings : 1 Active User
Joined: 14 Dec 2008 Posts: 107 Location: India
|
|
|
|
Hi all,
I have a ps which has data in the following format
Code: |
4454 fdfdsf 12/21/2009
4454 fdfdsf 12/21/2009
4454 fdfdsf 12/21/2009
4454 fdfdsf 12/21/2009
12/21/2009 4
4454 fdfdsf 12/22/2009
4454 fdfdsf 12/22/2009
4454 fdfdsf 12/22/2009
4454 fdfdsf 12/22/2009
12/22/2009 4
|
I want to add a header to each clumn....
I am using DFSORT Aptil 2006 version
Plz tell me how can i do this using ajcl
Thanks,
Ravi |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use HEADER1 (report header) or HEADER2 (page header) on the OUTFIL statement to add headings for a SORT, MERGE or COPY operation.
For example:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL HEADER1=('Col1',16:'Col2',32:'Col3',47:'Col4')
/*
|
Would give the following in SORTOUT for you input example:
Code: |
Col1 Col2 Col3 Col4
4454 fdfdsf 12/21/2009
4454 fdfdsf 12/21/2009
4454 fdfdsf 12/21/2009
4454 fdfdsf 12/21/2009
12/21/2009 4
4454 fdfdsf 12/22/2009
4454 fdfdsf 12/22/2009
4454 fdfdsf 12/22/2009
4454 fdfdsf 12/22/2009
12/22/2009 4
|
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
I have a same requirement as above
Quote: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL HEADER1=('Col1',16:'Col2',32:'Col3',47:'Col4')
/*
But i want the headers name as maximum legth like
OUTFIL HEADER1=('Column one',16:'Column two ',32:'Column three',47:'Column four')
If i ran the above code after changing , it throws error...something like overlapping.
|
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL HEADER1=('Column one',16:'Column two ',32:'Column three',47:'Column four')
/* |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
please show entire job output and try using code.
Code: |
OUTFIL HEADER1=('Column one',16:'Column two ',32:'Column three',47:'Column four')
|
How did you manage to run the above statement as it does not fit between cols 2-71.
Gerry |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
The following gets RC=0:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL HEADER1=('Column one',16:'Column two ',32:'Column three',
47:'Column four')
/*
|
I don't know what you did to get an error message.
Quote: |
If i ran the above code after changing , it throws error...something like overlapping. |
This doesn't tell us anything useful. You need to show the //SYSOUT messages you received. |
|
Back to top |
|
|
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
This is my input file of layout 46
[/quote]
----+----1----+----2----+----3----+----4----+-
20000028332 000004313512125882314 0201 CCA UND
20036297151 000004313070312032516 0201 CCA UND
20069499809 000004313070314103703 0201 CCA UND
This is my sort card:
Quote: |
//SYSIN DD *
OPTION COPY
OUTFIL HEADER1=(1:'CUST-PARTY-ID',
13:'CUST-ACCOUNT NUMBER',
35:'CUST ENTITY',
40:'CUST PRODUCT',
44:'CUST REL TYPE')
/*
This is the error i got:
ABENDED S000 U0016 CN(INTERNAL)
|
WER108I SORTIN : RECFM=FB ; LRECL= 46; BLKSIZE= 27968
WER110I SORTOUT : RECFM=FBA ; LRECL= 47; BLKSIZE= 32759
WER118A SORTOUT ILLEGAL OVERLAPPING FIELDS
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You are using Syncsort not DSFORT.
The control info that has a problem is not the control info Frank confirmed works. . .
Quote: |
This is the error i got:
ABENDED S000 U0016 CN(INTERNAL) |
No, that is the abend. . . This is the error:
WER118A SORTOUT ILLEGAL OVERLAPPING FIELDS
The header fields overlap (this has nothing to do with the positions of the data fields) - you need to correct them. . . |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Code: |
********************************* TOP OF DATA ********************
SYNCSORT FOR Z/OS 1.3.2.0R U.S. PATENTS: 4210961, 5117495 (
WELLPOINT HOLDINGS
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 1BE6E, MODEL 2097 706
SYSIN :
OPTION COPY
OUTFIL HEADER1=('WELCOME')
WER276B SYSDIAG= 1004134, 2856208, 2856208, 1984350
WER164B 6,880K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED
WER164B 0 BYTES RESERVE REQUESTED, 988K BYTES USED
WER146B 36K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER107A SORTOUT RECFM INCOMPATIBLE WITH REPORT WRITING
WER110I SORTOUT : RECFM=FB ; LRECL= 30; BLKSIZE= 300
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
is my SYSOUT
I found some error WER107A SORTOUT RECFM INCOMPATIBLE WITH REPORT WRITING...
How do I solve that??? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you tried using a RECFM more suited to carriage control in the first byte ? |
|
Back to top |
|
|
TS70363
New User
Joined: 07 Apr 2010 Posts: 94 Location: Bangalore, India
|
|
|
|
Yes, I tried out with a FBA file format..It is working fine...
But can we try out the same on FB file...It is giving some error...U0016
Also I need to create the header record separately in a FBA file and then copy it into a FB file using
Code: |
OUTREC FIELDS=(1:2,30). |
Can this be avoided by any means???? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
TS70363 wrote: |
Yes, I tried out with a FBA file format..It is working fine...
But can we try out the same on FB file...It is giving some error...U0016 |
Try using somethign like:
Code: |
OUTFIL REMOVECC,HEADER1=(... |
Quote: |
Also I need to create the header record separately in a FBA file and then copy it into a FB file using
Code: |
OUTREC FIELDS=(1:2,30). |
Can this be avoided by any means???? |
What are you asking, I'm lost- please rephrase your question. |
|
Back to top |
|
|
|