View previous topic :: View next topic
|
Author |
Message |
Michael Angelo Pagala
New User
Joined: 02 Mar 2007 Posts: 34 Location: somewhere in the middle
|
|
|
|
Good Day,
I would just like to know what is wrong with the sort card below. I am not sure why the SKIP=nL parameter does not reflect on my output.
Sample Input:
Code: |
MTC0000100690000067597
MTC0000300070001371906
MTC0000300070001970048
UN10000300076000288297
UN20000300076000288298
MTC0000400010001246826 |
Sort Card:
Code: |
SORT FIELDS=(1,3,CH,A,4,19,CH,A)
OUTFIL REMOVECC,
OUTREC=(1:4,36,4X),
SECTIONS=(1,3,SKIP=2L,
HEADER3=('ACCOUNT NUMBER'),
TRAILER3=('NUM OF RECS: ',COUNT=(EDIT=(TT)))),
HEADER2=(' THIS IS A TEST ',/,'-----------------------',2/) |
Output
Code: |
THIS IS A TEST
-----------------------
ACCOUNT NUMBER
0000100690000067597
0000300070001371906
0000300070001970048
0000400010001246826
NUM OF RECS: 04
ACCOUNT NUMBER
0000300076000288297
NUM OF RECS: 01
ACCOUNT NUMBER
0000300076000288298
NUM OF RECS: 01 |
I know I can put a 2/ on the header 3 to achieve the result I want..but I just want to know why the SKIP=nL is not applied.
I have tried reposition headers,trailers or anything I can think of..even if I think it does not matter..
using SYNCSORT FOR Z/OS 1.3.2.1R
thanks in advance |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
I know I can put a 2/ on the header 3 to achieve the result I want..but I just want to know why the SKIP=nL is not applied |
What is the result you want? Have you posted it? |
|
Back to top |
|
|
Michael Angelo Pagala
New User
Joined: 02 Mar 2007 Posts: 34 Location: somewhere in the middle
|
|
|
|
Arun Raj wrote: |
Quote: |
I know I can put a 2/ on the header 3 to achieve the result I want..but I just want to know why the SKIP=nL is not applied |
What is the result you want? Have you posted it? |
sorry about that..I just want to put two lines in between section
so the output should be like
Code: |
THIS IS A TEST
-----------------------
ACCOUNT NUMBER
0000100690000067597
0000300070001371906
0000300070001970048
0000400010001246826
NUM OF RECS: 04
ACCOUNT NUMBER
0000300076000288297
NUM OF RECS: 01
ACCOUNT NUMBER
0000300076000288298
NUM OF RECS: 01 |
that is what I am expecting from the SKIP=2L parameter |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Just I am about to leave from office. I will check it later and get back in case you have n't reached a solution |
|
Back to top |
|
|
Michael Angelo Pagala
New User
Joined: 02 Mar 2007 Posts: 34 Location: somewhere in the middle
|
|
|
|
the sort card is in the 1st post arun..thanks |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
From what I saw, you need to OMIT the REMOVECC and run your job. The ANSI carriage control character at pos-1 tells the printer to leave as many blank lines after printing each SECTION. Below are the code descriptions.
Code: |
Code Interpretation
blank Space one line before printing
0 Space two lines before printing
- Space three lines before printing
+ Suppress space before printing |
|
|
Back to top |
|
|
Michael Angelo Pagala
New User
Joined: 02 Mar 2007 Posts: 34 Location: somewhere in the middle
|
|
|
|
ok arun I will try that what you have suggested..thanks! |
|
Back to top |
|
|
Michael Angelo Pagala
New User
Joined: 02 Mar 2007 Posts: 34 Location: somewhere in the middle
|
|
|
|
I removed the REMOVECC parameter and the SKIP=nL worked..but I don't need the Carriage Controls..I guess I just need to add spaces above the headers..
so I guess SKIP=nL will not work with REMOVECC.
Quote: |
The REMOVECC parameter generates reports that do not include ANSI carriage control
characters that specify printer actions (for example, skipping a line or ejecting a page). |
quoted from the manual
thanks for the help again Arun |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
You're welcome |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
but I don't need the Carriage Controls.. |
To have the sort generate the spacing you want you do need "the Carriage Controls". . .
Why might you believe otherwise?
Why generate extra data lines when the "skip" provides exactly what you show you want? |
|
Back to top |
|
|
Michael Angelo Pagala
New User
Joined: 02 Mar 2007 Posts: 34 Location: somewhere in the middle
|
|
|
|
Hi dick,
If I understand correctly the REMOVECC removes the ANSI carriage control characters that specify printer actions..since I will just show and give the report in a flat file..I do not want the CC chars to be shown..
I just assumed this because when I remove the REMOVECC parameter the ouput did skip every section but have a single space in between them even if I declared SKIP=2L but it has a special char in between..
I tried SKIP=3L and the same happened but with a diff char in between..and tried SKIP=5L also..
output of SKIP=2L
Code: |
1 THIS IS A TEST
-----------------------
ACCOUNT NUMBER
0000100690000067597
0000300070001371906
0000300070001970048
0000400010001246826
NUM OF RECS: 04
0
ACCOUNT NUMBER
0000300076000288297
NUM OF RECS: 01
0
ACCOUNT NUMBER
0000300076000288298
NUM OF RECS: 01 |
output of SKIP=3L
Code: |
1 THIS IS A TEST
-----------------------
ACCOUNT NUMBER
0000100690000067597
0000300070001371906
0000300070001970048
0000400010001246826
NUM OF RECS: 04
-
ACCOUNT NUMBER
0000300076000288297
NUM OF RECS: 01
-
ACCOUNT NUMBER
0000300076000288298
NUM OF RECS: 01 |
output of SKIP=5L
Code: |
1 THIS IS A TEST
-----------------------
ACCOUNT NUMBER
0000100690000067597
0000300070001371906
0000300070001970048
0000400010001246826
NUM OF RECS: 04
-
0
ACCOUNT NUMBER
0000300076000288297
NUM OF RECS: 01
-
0
ACCOUNT NUMBER
0000300076000288298
NUM OF RECS: 01 |
since I am not very knowledgeable in SORT esp reports..I assumed this special chars are useful or are interpreted if the report is actually printed or published, etc..and these chars are the CC chars..
thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I assumed this special chars are useful or are interpreted if the report is actually printed or published, etc..and these chars are the CC chars.. |
Yes.
I don't yet understand why a "flat file" needs the additional blank lines. If some computer process is to use the data, the blank lines shouldn't be needed. If the data is to be read as a real report (by a person), the removecc wouldn't be used to preserve the spacing. . .
Probably i am misunderstanding something. . . |
|
Back to top |
|
|
Michael Angelo Pagala
New User
Joined: 02 Mar 2007 Posts: 34 Location: somewhere in the middle
|
|
|
|
hi,
sorry for the confusion..this flat file is just a validation file or summary file of some data that I will use for 3 days only..I just want to format the data so it can be easily understand..I can use ezy trieve for it but I want to try SORT since I am not familiar with it..and I have the excuse to practice it all day
thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Quote: |
sorry for the confusion.. |
Not to worry. Some days i'm slower than others
Sounds like you are good to go with either approach
Good luck,
d |
|
Back to top |
|
|
|