Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Mon Sep 12, 2005 4:43 am Post subject:
Bprasanna,
The carriage control character have the following meaning.
Code:
blank = Advance one line
0 = Advance 2 lines
- = Advance 3 lines
+ = Do not advance
Easytrieve is skipping 3 lines before actually printing the detail records. you can change the sort to do the same or change easytrieve to not to skip 3 lines.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Mon Sep 12, 2005 9:48 am Post subject:
Quote:
Hi Kolusu,
Could you please let me know how can I modfy the SORT card to get the same report as Ezt?
bprasanna,
All you need is to add the contents in bold in the below control cards.
Quote:
SORT FIELDS=(77,10,CH,A,25,10,CH,A,46,2,CH,A)
OUTFIL FNAMES=OUT1,
HEADER2=(C' ',&DATE,35X,
C'REPORTING OF INFORMATION ',31X,
C'PAGE ',&PAGE,/,3/,
34X,C'AC/NO ',5X,C'CODE',6X,C'DESC',6X,
C' DATE '),
LINES=(ANSI,55),
OUTREC=(32X,25,10,5X,46,2,4X,60,9,3X,77,10,58X)
Hi Kolusu,
Thanks for the reply.I am getting the 3 blank line by using 3/.But I am not able to achive the 1,- and 0 at the position '1' of the o/p file.
By hard coding the values in the HEADER2 ,I am able to get the "1" and
"-" .But I am not able to get '0' at the starting of every detail record.The system is automatically producing the '+' at the starting of detail record for each page.Is there any other method instead of using the CHANGE command at the outrec fields ?What I mean is how can I get the '0' insted of "+" for the first detail record on each page automatically?
For getting "1" and "-" I changed the card like below.
Code:
HEADER2=(C'1 ',&DATE,35X,
000044 C'REPORTING OF INFORMATION ',31X,
000045 C'PAGE ',&PAGE,c'-',3/,
000046 34X,C'AC/NO ',5X,C'CODE',6X,C'DESC',6X,
000047 C' DATE '),
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Tue Sep 13, 2005 1:36 am Post subject:
bprasanna,
Quote:
By hard coding the values in the HEADER2 ,I am able to get the "1" and "-".
This is impossible.
Quote:
For getting "1" and "-" I changed the card like below.
I think you are actually looking at position 2 on the file. ANSI print control characters cannot be hardcoded in your sort card because they are outside the HEADER/OUTREC boundary. The output dataset will be created as FBA and the ANSI characters will be hidden if you open an FBA dataset in BROWSE mode. So, if you have opened your dataset in browse mode the character '1' your are looking at is actually at Column 2. To see the correct ANSI chars, open in EDIT/VIEW mode.
[quote]
,&PAGE,c'-',3/,
[/code]
3/ means - Skip 3 lines and print 'AC/NO' after that. But the '-' has been coded before 3/ which will actually put it after PAGENO in line 1 and not on line 2.
I am saying all these under the assumption that you have used the control as
Code:
HEADER2=(C'1 ',&DATE,35X,
000044 C'REPORTING OF INFORMATION ',31X,
000045 C'PAGE ',&PAGE,c'-',3/,
000046 34X,C'AC/NO ',5X,C'CODE',6X,C'DESC',6X,
000047 C' DATE '),
Kolusu,
Please Let me know if I am missing something.
I am able to get the "1" and "-" in the o.p file.I opened the file in EDIT mode and able to see the special characters(1 and -) in the file.
Regarding the 3 blank lines,I am not able to get then if i use 3/ along with the above hard coded values in the HEADER2 statment.I tested with the below SORT card and I got the o/p as shown below.
Code:
SORT FIELDS=(77,10,CH,A,25,10,CH,A,46,2,CH,A)
OUTFIL FNAMES=OUT1,
HEADER2=(C'1',&DATE,35X,
C'REPORTING OF INFORMATION ',31X,
C'PAGE ',&PAGE,/,C'-',3/,
34X,C'AC/NO ',5X,C'CODE',6X,C'DESC',6X,
C' DATE '),
LINES=(ANSI,55),
OUTREC=(32X,25,10,5X,46,2,4X,60,9,3X,77,10,58X)
o/p file display in EDIT mode:
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
109/13/05 REPORTING OF INFORMATION
-
0
AC/NO CODE DESC DATE
+ AAAAAAA001 1 SRPHAAR1 09/14/2005
AAAAAAA002 1 SRPHAAR1 09/14/2005
Here I am getting another 0 but it's ok to me to get the 0 in the third line.My main issue here is How can I get the "0" insted of "+" in the detail record.Is there any chance that will be produced automatically.
Hi Phantom,
Thank you for your reply.Generally I used to see replies from Kolusu for the syncsort queires.So I haven't checked the name for the latest reply.
Sorry for this.
I saw a table in the SYNCSORT manual giving VALID ANSI control characters,Under which they mentioned CODE and INTERPRETATION. Do you have any idea about it?
From all the above replies I think we may not able to produce the same report as Ezt.
Once agin my thanks to you and Kolusu for the suggestions.
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Wed Sep 14, 2005 12:13 am Post subject:
Bprasanna,
Using LINES=ANSI, you can control the multi-line header or detail records, but you have no control between the last line of header and detail records. I think Syncsort puts a '+' after it prints the last header line by default. I am not sure how to control it.
Code:
VALID ANSI control characters,Under which they mentioned CODE and INTERPRETATION. Do you have any idea about it?
I think you are asking about the Channels mentioned in the table. I am not sure, but I hope it is the I/O Channel connected to different devices.
Probably someone else have an answer for your questions. I am also having my fingers crossed !!!
Thank you Phantom for your reply.
Yes I am asking about the channels mentioned in the doc under ANSI cotrol character heading. I thnik we need to wait and see the reply from Kolusu.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum