mainframe copybook - occurs question

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
lindakampa
Posts: 4
Joined: Fri Mar 12, 2010 7:11 am

mainframe copybook - occurs question

Post by lindakampa »

I am trying to convert an EBCDIC file with zoned decimal to an ASCII tab delmited file. I am having a problem with the copybook wizard where it doesn't interpret the following OCCURS syntax correctly:

03 XXXX-PENDING-PYMT-SCHED OCCURS 24 TIMES.
04 XXXX-PEND-SCHED-START-DATE PIC S9(8)V9(5). 7,535 A
04 XXXX-PEND-SCHED-FREQUENCY PIC S9. 7,548 A
04 XXXX-PEND-NUMBER-OF-PYMTS PIC S9(3). 7,549 A
04 XXXX-PEND-AMOUNT-OF-PYMT PIC S9(11)V99. 7,552 A
04 XXXX-PEND-ESCROW-PAYMENT PIC S9(7)V99. 7,565 A
04 XXXX-PEND-SCHED-RATE PIC S9(3)V9(4). 7,574 A
04 XXXX-PEND-PYMT-OCCURRENCES PIC S9(3). 7,581 A
04 XXXX-PEND-PYMT-RECALC-CODE PIC S9(3). 7,584 A

This type of OCCURS is working correctly:
03 XXXX-SIGNER-FLAG OCCURS 100 TIMES PIC S9. 15,494 A

Do you know of a way I can get the first group to repeat the 8 fields 24 times?

Thanks in advance for your help!

Linda Kampa
lindakampa
Posts: 4
Joined: Fri Mar 12, 2010 7:11 am

Re: mainframe copybook - occurs question

Post by lindakampa »

I wanted to clarify what the issue is - the first set of logic below outputs one copy of set of the fields, instead of outputting the 24 occurrences.
Thanks! Linda Kampa
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: mainframe copybook - occurs question

Post by DataMystic Support »

Hi Linda,

The '7,535 A' text at the end of each line is not correct and needs to be removed ie.

Code: Select all

03 XXXX-PENDING-PYMT-SCHED OCCURS 24 TIMES.
04 XXXX-PEND-SCHED-START-DATE PIC S9(8)V9(5). 
04 XXXX-PEND-SCHED-FREQUENCY PIC S9. 
04 XXXX-PEND-NUMBER-OF-PYMTS PIC S9(3). 
04 XXXX-PEND-AMOUNT-OF-PYMT PIC S9(11)V99. 
04 XXXX-PEND-ESCROW-PAYMENT PIC S9(7)V99. 
04 XXXX-PEND-SCHED-RATE PIC S9(3)V9(4).
04 XXXX-PEND-PYMT-OCCURRENCES PIC S9(3). 
04 XXXX-PEND-PYMT-RECALC-CODE PIC S9(3). 
Also - we recommend you use the Mainframe Copybook Filter instead of the wizard (the wizard generates a stack of filters for you, while the Mainframe Copybook Filter keeps them behind the scenes).
Post Reply