|
View previous topic :: View next topic
|
| Author |
Message |
Simma Hemanth
New User
Joined: 05 Jul 2021 Posts: 7 Location: India
|
|
|
|
Hi ,
I have to add heading of fields and pipe de-limited by using sort
The fields are
| Code: |
DB_TMSTAMP - STARTING POS 1 AND LENGTH 26
ERR_IMP - STARTING POS 27 AND LENGTH 8
ERR_ITR - STARTING POS 35 AND LENGTH 4 |
THANKS IN ADVANCE
Code'd and Edited |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
| Your questions is? What have you tried? Show samples of Input and desired Output? |
|
| Back to top |
|
 |
Simma Hemanth
New User
Joined: 05 Jul 2021 Posts: 7 Location: India
|
|
|
|
| Code: |
INPUT
// SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,26,27,8,35,4,39,12,51,4,BI,TO=ZD,LENGTH=9)
//*
OUTPUT
TB_TMSTAMP ERR_PGM
2021-05-19-02.30.25.432101 ZST217P
HOW TO GIVE THE HEADING FOR THESE FIELDS
TB_TMSTAMP
ERR_PGM...ETC |
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
1) your issue is neither JCL nor VSAM
2) your “INPUT” is not your input data, but a fragment of SORT utility statements
3) your actual input data is missing, and not commented in any manner
4) your output data is unclear; even: is it your actual output, or desired output, or smth. else?
5) remains unclear: do you want to ask something, or to demonstrate your efforts, or what? If you are asking: what exactly is your question - there is no one word around your CODE block…
6) the words “INPUT”, “OUTPUT”, and other unclear stuff is not a code; should not be enclosed into code-tags
7) please, clarify your sentence “pipe de-limited by using sort” - what do you mean by that? |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
| Back to top |
|
 |
Simma Hemanth
New User
Joined: 05 Jul 2021 Posts: 7 Location: India
|
|
|
|
I was getting invalid overlapping field error, help me out
I/P LRECL=463
O/P LRECL= 173
| Code: |
//SYSIN DD*
OPTION COPY
OUTFIL FNAMES= SORTOUT,
HEADER1=(1:C'DB_TMSTAMP',27:C'ERR_PGM',35:C'ERR_PARA_NO'
39:C'ERR_PGM_ACTION',51:C'ERR_MSG_NO',55:C'ERR_TYPE'
59:C'ERR_LEVEL',61:C'ERR_FIELD',79:C'ERR_CODE,
87:C'REGION',95:C'TRN_ID',99:C'TASK_NO',
121:C'SERVICE_NME',424:C'DB_USERID'),
OUTREC=(1,26,27,8,35,4,39,12,51,4,BI,TO=ZD,LENGTH=9,
55,4,59,2,BI,TO=ZD,LENGTH=4,61,18,79,4,BI,TO=ZD,LENGTH=9,
87,8,95,4,99,4,BI,TO=ZD,LENGTH=9,121,50,424,8)
/*
WER118A SORTOUT INVALID OVERLAPPING FIELDS
[b][/b] |
|
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
Check where the fields in the HEADER1 are starting and what lengths you have specified (fields @35 and @55 and alikes). You will be able to fix that yourself.
Also this topic should be moved to SYNCSORT section of the forum. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
It would be nice to see (as has been asked several times): what is your desired output? How do you expect it to look like?
In the parameter HEADER1 all the specified fields are overlapping, except the last one.
In this simple case it is as obvious as a piece of cake. In a more complicated case it makes sense to start adding this large number of parameters one by one, in order to detect: which of them is causing the error?
When starting from a huge mess of keywords and values at once it’s getting very hard (or impossible) to find out: what is the problem?
P.S.
It remains a full mystery: what the “pipe-delimited SORT statement” does mean? |
|
| Back to top |
|
 |
Simma Hemanth
New User
Joined: 05 Jul 2021 Posts: 7 Location: India
|
|
|
|
I got incompatible RECFM INCOMPATIBLE WITH REPORT WRITING. can u help me out from this
I/P LRECL= 463
O/P LRECL=193
| Code: |
// SYSIN DD*
OPTION COPY
OUTFIL FNAMES = SORTOUT
HEADER1=( 1:C'DB_TMSTAMP',27:C'ERR_PGM',35:C'ERR_PARA_NO'
46:C'ERR_PGM_ACTION',60:C'ERR_MSG_NO',70:C'ERR_TYPE'
77:C'ERR_LEVEL',86:C'ERR_FIELD',104:C'ERR_CODE,
113:C'REGION',121:C'TRN_ID',127:C'TASK_NO',
136:C'SERVICE_NME',186:C'DB_USERID'),
OUTREC=(1,26,27,8,35:35,4,46:39,12,60:51,9,
70:55,4,77:59,4,86:61,18,104:79,9,
113:87,8,121:95,4,127:99,9,136:121,50,186:424,8)
/*
SORTOUT HAS INCOMPATIBLE LRECL
|
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
Please, use the Calculator application to carefully calculate your real OUTREC size, by summarizing all field sizes. I, personally, refuse to do this calculation for yourself, but SORT utility did this, and displayed its message stating that the record size is wrong.
Please, verify the real LRECL parameter for your real dataset allocated to your //SORTOUT DD (not just your comment on expected record size!) |
|
| Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
| Hint:
|
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| BTW, there must be displayed extra messages from SORT, stating both LRECL of the output dataset, and the length of the record created by your OUTREC parameter. Those message would be useful for yourself, but you have ignored them, asking the forum instead… |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
| And this is moved to Student Section apparently. Please research on errors and link provided, understand how HEADER1 works and do a test fixing one offset at a time from HEADER1 and DETAIL until you get successful. |
|
| Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Something else that I do is I leave the LRECL off the JCL entirely.
This allows Syncsort to create the lrecl as it sees fit.
No mismatch errors then. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| daveporcelan wrote: |
| Hint:
|
This is the secondary reason.
The message “INCOMPATIBLE LRECL” means that the size of OUTREC= is not equal to the available value of SORTOUT LRECL. This is the primary reason which needs to be fixed first of all. |
|
| Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I had to count on my fingers and this does come to 193.
This however comes to 194. Hence the error.
This is why I just leave it off the JCL, then no errors. |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
| daveporcelan wrote: |
I had to count on my fingers and this does come to 193.
This however comes to 194. Hence the error.
This is why I just leave it off the JCL, then no errors. |
In this case it will be different error even if you don't code RECFM and LRECL as HEADER1 don't match up with DETAIL on total length, In any other case ( without HEADER1) you are right.
Let us give chance to let TS figure that out. It is simple by now what to fix. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|