[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rocks::dec_edi

Title:DEC/EDI
Notice:DEC/EDI V2.1 - see note 2002
Moderator:METSYS::BABER
Created:Wed Jun 06 1990
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3150
Total number of notes:13466

3013.0. "No output from Map without generating Soft Error?" by GENIE::qmodo.ebo.dec.com::genie::munt (Colin Munt) Fri Feb 14 1997 11:32

I need to program a map such that some of the documents in the Application 
File generate no corresponding EDIFACT documents. This can be done with 
the $ERROR function which generates a Soft Error. Is there any other way of 
doing with without generating an error?

Thanks
...colin
T.RTitleUserPersonal
Name
DateLines
3013.1SYSTEM::newdial_7.reo.dec.com::JOHNSONRichard Johnson , http://samedi.reo.dec.comFri Feb 14 1997 16:325
Colin

You could put a condition in each map part.

Richard
3013.2GENIE::qmodo.ebo.dec.com::genie::muntColin MuntMon Feb 17 1997 09:3628
Richard,

Thanks for your suggestion.

The Application File I am trying to map looks something like this:

- Header Record (generates BGM segment)
- Detail Record (generate NAD segments) ... can repeat theoretically 9999 
times

If the Detail Records contain no records of a certain type then the whole 
EDIFACT document should be discarded. The way I have implemented this so 
far is to increment a counter when generating the NAD segment (There is a 
condition on this map to only handle the relevant record type.) In the 
summary section the counter is tested. If zero then a Soft Error ($ERROR) 
is generated and the EDIFACT document is not created.

If I was to build a check into the Map for BGM then this would mean writing 
a FOR loop from 1 to 9999 as I can see no way of getting the number of 
Detail Records without using a counter and the BGM is generated before the 
NAD.

...colin


I don't see how I could easily implement this though. The record type in 
question can theoretically repeat 9999 times. I considered using FOR loops 
but with an end value of 9999 this wouldn't be very efficient.