EZT+ put statement



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

EZT+ put statement

Postby jsdaugherty » Mon Nov 16, 2009 10:28 pm

I am trying to write (using the PUT statement) a record to a PS FB file, and when I edit the resulting file, the "line number" portion of the file is being overwritten with the last 6 bytes of the record. I load each defined field in working storage with a value, then move the work-rec to the file-rec and PUT.

The output file is defined each time the EZ+ is run. Any ideas?
jsdaugherty
 
Posts: 3
Joined: Mon Nov 16, 2009 10:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: EZT+ put statement

Postby dick scherrer » Tue Nov 17, 2009 12:24 am

Hello and welcome to the forum,

It will help if you post the EZT record layout, some sample input, and the data that results in the output file.

When posting code, jcl, data, etc, please use the Code tag to improve readability and preserve alignment. Use Preview to see your post as it will appear to the forum (rather than the Reply Editor) and when you are satisfied, Submit.
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: EZT+ put statement

Postby jsdaugherty » Tue Nov 17, 2009 12:39 am

PARM DEBUG(DMAP FLOW STATE)
FILE SQLFILE
SF-SSN 1 9 A
SF-FNAME 12 27 A
SF-LNAME 39 27 A
SF-DOB 66 8 A
SF-STREET 76 40 A
SF-CITY 118 20 A
SF-STATE 150 2 A
SF-ZIP 154 5 A
FILE TRANFILE
TF-REC 1 357 A
FILE RPT1OUT PRINTER
%EZTHCTCW
HDW-REC W 357 A
HDW-KEY HDW-REC 17 A
HDW-KEY-SSN HDW-KEY 9 N
HDW-KEY-ELIG-CCYYMM HDW-KEY +9 6 N
HDW-KEY-ELIG-CODE HDW-KEY +15 2 N
HDW-REC-BODY HDW-REC +17 340 A
HDW-SWA-STATE HDW-REC +17 2 A
HDW-MSGID HDW-REC +19 6 N
HDW-SSN HDW-REC +25 9 N
HDW-FIRST-NAME HDW-REC +34 25 A
HDW-MIDDLE-NAME HDW-REC +59 25 A
HDW-LAST-NAME HDW-REC +84 35 A
HDW-SUFFIX HDW-REC +119 10 A
HDW-DOB HDW-REC +129 8 A
HDW-STREET-1 HDW-REC +137 55 A
HDW-STREET-2 HDW-REC +192 55 A
HDW-STREET-3 HDW-REC +247 55 A
HDW-CITY HDW-REC +302 30 A
HDW-STATE HDW-REC +332 2 A
HDW-ZIP HDW-REC +334 15 A
HDW-ELIG-MMCCYY HDW-REC +349 6 N MASK '999999'
HDW-ELIG-CODE HDW-REC +355 2 N MASK '99'
JOB INPUT (SQLFILE)
MOVE 'NM' TO HDW-SWA-STATE
HDW-MSGID = 0
MOVE SF-SSN TO HDW-SSN
MOVE SF-FNAME TO HDW-FIRST-NAME
MOVE SPACES TO HDW-MIDDLE-NAME
MOVE SF-LNAME TO HDW-LAST-NAME
MOVE SPACES TO HDW-SUFFIX
MOVE SF-DOB TO HDW-DOB
MOVE SF-STREET TO HDW-STREET-1
MOVE SPACES TO HDW-STREET-2
MOVE SPACES TO HDW-STREET-3
MOVE SF-CITY TO HDW-CITY
MOVE SF-STATE TO HDW-STATE
MOVE SF-ZIP TO HDW-ZIP
MOVE 092009 TO HDW-ELIG-MMCCYY
MOVE 10 TO HDW-ELIG-CODE
FILL IN VSAM KEY FIELDS
MOVE SF-SSN TO HDW-KEY-SSN
MOVE 200909 TO HDW-KEY-ELIG-CCYYMM
MOVE 10 TO HDW-KEY-ELIG-CODE
MOVE HDW-REC TO TF-REC
DISPLAY 'TF-REC = '
DISPLAY HEX TF-REC
DISPLAY 'RECORD-LENGTH = '
DISPLAY TRANFILE:RECORD-LENGTH
PUT TRANFILE

INPUT-----
123456777 MARK SMITH 09271959 999 SERENITY ROAD ALBUQUERQUE NM 871233967

OUTPUT ----

what
should
appear
as 000001 is actually the last 6 bytes of HDW-REC

****** ***************************** Top
200910 123456777920090910NM000000123456777 ...........[code][/code]
jsdaugherty
 
Posts: 3
Joined: Mon Nov 16, 2009 10:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: EZT+ put statement

Postby dick scherrer » Tue Nov 17, 2009 1:15 am

Hello,

Suggest you practice with the Preview. . .

Is there some reason the displays before the put were not posted? The more useful info you post, the more likely we can help.
what
should
appear
as 000001 is actually the last 6 bytes of HDW-REC
I do not understand what this is telling us.

Keep in mind that your issue is completely clear to you, but may not be to others who read the topic.
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: EZT+ put statement

Postby jsdaugherty » Tue Nov 17, 2009 1:39 am

The results of the display (with the middle 100 or so bytres not shown)

CHAR 12345677720090910NM000000123456777MARK                                   
ZONE FFFFFFFFFFFFFFFFFDDFFFFFFFFFFFFFFFDCDD444444444444444444444444444444444444
NUMR 12345677720090910540000001234567774192000000000000000000000000000000000000
     1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...7
     
               SMITH           
  4444444444EDCEC44444444444
  00000000002493800000000000
  5...80...85...90...95..100

CHAR   ALBUQUERQUE                   NM87123          09200910     
ZONE 44CDCEDECDDEC4444444444444444444DDFFFFF4444444444FFFFFFFF     
NUMR 001324845984500000000000000000005487123000000000009200910     
   301...5...10...15...20...25...30...35...40...45...50...55..     


The issue of the 200910 showing up in the tranfile is only seen when I pul the file up in edit mode....
jsdaugherty
 
Posts: 3
Joined: Mon Nov 16, 2009 10:16 pm
Has thanked: 0 time
Been thanked: 0 time

Re: EZT+ put statement

Postby dick scherrer » Tue Nov 17, 2009 2:42 am

Hello,

What are the recfm and lrecl for the problem file? It may help if you post the jcl for this run.
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


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post