using the display statement



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

using the display statement

Postby nicole » Thu Sep 23, 2010 10:59 pm

Hi there,

Ok here is my problem. I am sending my report to a CSV file. My one field is not being populated with data, it shows up as gibberish and I am trying to use a display statement to see where I'm going wrong, I think i'm using it in the wrong place in my program.

example:

MOVE CASH-TRANS-NO TO WS-CSV2-SEQ-NUM NW082710
DISPLAY 'WS-CSV2-SEQ-NUM'

This is what it shows me in SDSF when I run this:

TRANS HOLD TRANS BATCH SEQ
CDE *** ERROR MESSAGE *** CD CAT CD DATE NUM NUM

10 NO ACCT 01 C 2031010827 12595

WS-CSV2-SEQ-NUM
10 NO ACCT 01 C 3911350827 17565

In my csv file the seq num is this: ž*

I just want to figure out what I'm transferring. Let me know. Thanks.
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: using the display statement

Postby dick scherrer » Thu Sep 23, 2010 11:36 pm

Hello,

I suspect that the problem field is defined as packed-decimal or binary.

To create readable numbers in a csv file, use an edited value (i.e. PIC 99999.99-)
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: using the display statement

Postby nicole » Fri Sep 24, 2010 12:26 am

Ya I think that is what is wrong also, but when I changed it to:

WS-CSV2-SEQ-NUM WS-CSV2-REC +47 05 N MASK (BWZ '99999')

It makes no difference..
I just really need to know where to place my display statements so I know where this field is getting populated. Thanks.
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: using the display statement

Postby dick scherrer » Fri Sep 24, 2010 2:57 am

Hello,

It makes no difference..
Suggest you show the value in hex both ways.

I just really need to know where to place my display statements so I know where this field is getting populated.
I do not understand this question. Typically, displays are placed before and/or after the feidls to be looked are referenced/modified. The display will not show where the field is poppulsted - you will have to determine this and "display" accordingly.

Possibly i misunderstand. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: using the display statement

Postby nicole » Fri Sep 24, 2010 3:02 am

Oh ok ya your probably right, I don't know my easytrieve that well. You were correct about that field being packed I'm just looking thru a load of other easytrieve programs to find an example of unpacking a field. Sorry if I wasted your time but do appreciate the help. ;)
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: using the display statement

Postby dick scherrer » Fri Sep 24, 2010 3:27 am

Hello,

Not a waste :)

The way to unpack a field is to move it to a field that is zoned-decimal. . .

When creating a csv file to download to Unix or Windows, there should be no packed or binary data.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: using the display statement

Postby nicole » Fri Sep 24, 2010 3:30 am

Ya well there is and I don't know why, wish I would of learned easytrieve in school, would of made it way easier. :) Later.
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: using the display statement

Postby dick scherrer » Fri Sep 24, 2010 5:22 am

Hello,

Let me clarify my last post.

If you are writing a csv file to download, you should not define any packed-decimal or binary fields in this output file.

If you are reading a "csv" file that already has packed-decimal and/or binary fields, you will have to move them to another field to "see" them in a display.

What happens if you generate a report? Will this display the data as you want it?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: using the display statement

Postby nicole » Fri Sep 24, 2010 8:22 pm

Ok, I know I'm not making myself clear but I will try to explain. There are several reports that this job generates. One of these reports they want sent to them in a CSV file, sent through email. When I move the one field to the appropriate column, all the data comes out as gibberish. This field is already packed. When I view the report on the mainframe it is correct and everything looks normal. Now I understand about what your saying to move them to another field to "see" them in a display, but how do you go about doing that. Is it just another move or do I have to define another field to accept this? Let me know if you can. Thanks again.
nicole
 
Posts: 23
Joined: Thu Jul 22, 2010 10:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: using the display statement

Postby dick scherrer » Sat Sep 25, 2010 4:16 am

Hello,

Easytrieve works differently creating a report versus creating a "file".

Suggest you discontinue this "report" and define this as a file instead. The output file should contain what you are looking for.

If not, let me know and we'll proceed from there :)

Have a great weekend,

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Next

Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post