need info on ASCII char delimiters

sreekuax

Member
Hello All,

I have to extract some GL account data and it has been asked to do with the below formats..

record separator to be CRLF (ASCII 13 followed by ASCII 10).
Field separator to be single tab character (ASCII 9).

Can anybody help me in identifying the corresponding progress 4GL codes for this ! ?
eg : SKIP means next line... ";" means ';' delimiter... like this ...
 

tamhas

ProgressTalk.com Sponsor
For complete control over the output, use PUT UNFORMATTED to do the export. You can use CHR(n) to output any ASCII character. If the code is running on Windows, SKIP will put out the CRLF for you, but if it is running on *Nix then you will just get LF. So, for code running on *Nix for consumption on Windows, omit the SKIP and put in your own line breaks with CHR()
 

sreekuax

Member
For complete control over the output, use PUT UNFORMATTED to do the export. You can use CHR(n) to output any ASCII character. If the code is running on Windows, SKIP will put out the CRLF for you, but if it is running on *Nix then you will just get LF. So, for code running on *Nix for consumption on Windows, omit the SKIP and put in your own line breaks with CHR()

Hi,
U mean to say ... using CHR(n) and substitute values 9 in ASCII 9 like :: CHR(9) ? and like wise... ?
 

sreekuax

Member
We are in windows....
Can you tell me... what is actually meant by record separator to be CRLF (ASCII 13 followed by ASCII 10). ? I am doubt with the followed by !! ?
 

sreekuax

Member
For complete control over the output, use PUT UNFORMATTED to do the export. You can use CHR(n) to output any ASCII character. If the code is running on Windows, SKIP will put out the CRLF for you, but if it is running on *Nix then you will just get LF. So, for code running on *Nix for consumption on Windows, omit the SKIP and put in your own line breaks with CHR()


I tried a sample one :

output stream rep-stream to 'filename'.
for each pt_mstr no-lock :
put stream rep-stream unformatted
pt_part chr(9)
pt_abc chr(9)
pt_desc1 chr(9)
pt_desc2 chr(9)
pt_part_type
chr(13) chr(10).
end.
stream close.

The out put is :

Part Class Desc1 Desc2 Type
1000711592 A PROALIGN OPTIMIZATION MODULE STATE METRON
Part Class Desc1 Desc2 Type
1000711597 C PROALIGN OPTIMIZATION MODULE 5 STATE PAK METRON

Y the column header is repeating ? also how I can reduce to one column header and remaning as correponding data i.e
Part Class Desc1 Desc2 Type
1000711592 A PROALIGN OPTIMIZATION MODULE STATE METRON
1000711597 C PROALIGN OPTIMIZATION MODULE 5 STATE PAK METRON
 

tamhas

ProgressTalk.com Sponsor
That must be the output of some other program. PUT does not provide labels of any kind. To get labels with PUT, you have to create the labels yourself.

CRLF is simply what Windows uses for a line break in text files.
 

sreekuax

Member
That must be the output of some other program. PUT does not provide labels of any kind. To get labels with PUT, you have to create the labels yourself.

CRLF is simply what Windows uses for a line break in text files.

Hi ,

I have only put the labels... sorry for not mentioning it... but my doubt is why the headers are repeating for each record ? is that because I have used
chr(13) chr(10).
end. ?
 

TomBascom

Curmudgeon
If you want help debugging your program you have to post the program that you are really using. The program that you have shown is obviously not the one which created the output shown.
 

rzr

Member
If you wrote the PUT stms that had "labels" inside the for each... loop, then move it out of the for each... as mentioned above , if you can show us the exact program then maybe it will be easier to assist.
 

sreekuax

Member
Yes.... I was keeping the label part inside the for loop.... :(...
thanks guys... now am getting it in a proper shape...
:)
 
Top