Description


Hello everybody I think it is time for uniface to give us the ability to Change on the fly the value of $FILE_NEW_LINE CR or LF or CRLF. That will make uniface much easier when dealing with other programs.

Use Case


That will make uniface much easier when dealing with other programs With out the need to open a new aps with different asn file

Importance



Type


Uniface 4GL

Operating System


Windows

Status


Closed

6 thoughts on “CHANGE $FILE_NEW_LINE ON THE FLY”

  1. Hi Adrian,For Example in the same session one has to work with Cheque Printing Software .That needs CR as the End OF LineAnd at the same time th same user needs to printA Cheque  on a Printer with Different Immage Technologies,One That Accept only CRLF as the end of line.And also the same user need to create an EDI Document,that needs a CRLF AS THE END OF LINE

  2. Sorry Guys I miss led you  , as I found out $FILE_NEW_LINE does not work at all.No matter what you set , the out come is always CRLF.So I opened   new  Case 00880002 , asking uniface , what is going on.WHY changing the value of $FILE_NEW_LINE does not change %%^ when using 3GL UGETREGS , it is always CRLF I found out that $NEWLINE=CR is working all right so what is $FILE_NEW_LINE good for ?It looks like $FILE_NEW_LINE does not do anything at all setting $FILE_NEW_LINE=CR AT THE [SETTINGS] SECTION OF THE ASN and writing this line of code $91 = “A%%^%%%B%%^%%%C%%^” perform “FH_PRINT_CH”XEXPORT(long) FH_PRINT_CH(void) { unsigned char bufr_inp[256]; int i; memset(bufr_inp,0,256); void)UGETREGS(CHECK_REG,(unsigned char *)bufr_inp, (short)sizeof bufr_inp); for (i=0; bufr_inp[i]!=”; i++) u_printf(“bufr_inp[%d]=%d=%c\n”,i,bufr_inp[i],bufr_inp[i]); return(0); }then i get at the transcript window bufr_inp[0]=65=A bufr_inp[1]=13= bufr_inp[2]=10=bufr_inp[3]=66=B bufr_inp[4]=13= bufr_inp[5]=10=bufr_inp[6]=67=C bufr_inp[7]=13= bufr_inp[8]=10=——————————————– But if i remark the $FILE_NEW_LINE=CR and write $NEWLINE=CR AT THE [SETTINGS] SECTION OF THE ASN then i get at the transcript windowbufr_inp[0]=65=A bufr_inp[1]=13= bufr_inp[2]=66=B bufr_inp[3]=13= bufr_inp[4]=67=C bufr_inp[5]=13=

  3. Hi,Switching between the two could be done using $tometa(ascii value)… Assign $tometa to the appropriate field and concat in to text string – hey presto…..Regards,Knut

  4. Hi Avner,This works for me: variables  string  vs_cr, vs_crlf  raw  vs_rawendvariablesvs_cr = $tometa(13)vs_crlf = $tometa(10)vs_raw = $concat(vs_cr, vs_cr, vs_cr)vs_raw = $concat(vs_raw, vs_crlf, vs_crlf, vs_crlf)filedump/raw vs_raw, “c:\raw.txt”When I check the output file, I find HEX 0A (ZeroA) and HEX 0D (ZeroD) in the file…Regards,Knut

Leave a Reply