using the display statement



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Re: using the display statement

Postby Scott Lippincott » Fri Oct 15, 2010 12:15 pm

Look in the manual at the difference between MOVE and assignment.

Instead of using: MOVE CASH-TRANS-NO TO WS-CSV2-SEQ-NUM (no conversion performed)
try: WS-CSV2-SEQ-NUM = CASH-TRANS-NO (numeric formats are changed)

If that doesn't work, use DISPLAY HEX WS-CSV2-SQ-NUM to see exactly what is in the field.

When creating CSV files in Easytrieve, it is best to:
1. Define your CSV file as a printer - FILE CSVFILE F 400 PRINTER (replace 400 with your LRECL)
2. Define numeric fields written to the CSV file with an edit mask. (to embed decimal point and sign)
3. Define delimiter character string(s)
DEFINE D1 W 1 A VALUE '"'. * Double quote - first and last field on DISPLAY statement
DEFINE D2 W 3 A VALUE '","' . * Double quote comma double quote - field separator
4. Use DISPLAY CSVFILE D1 field1 D2 field2 D2 field3 D2 . . . . . . fieldN D1
Scott Lippincott
 
Posts: 5
Joined: Wed Jul 28, 2010 7:30 am
Has thanked: 0 time
Been thanked: 1 time

Previous

Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post