× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello.
First of all: assign to database-thefile, i suppose.
Please code also:  file status is fs-thefile
After any i-o operation, please check the value of fs-thefile: if it is not 
'00' something wrong has happended.
Hear you soon.
Sincerely

        Domenico Finucci
        Fiditalia S.p.A. via G. Silva, 34 - 20149 Milano
        Sistemi informativi, Tel. + 39 02-43.01.2494
        E-mail: domenico.finucci@xxxxxxxxxxxx 
> Sito internet: www.fiditalia.it
> 


-----Messaggio originale-----
Da: jared [mailto:jhunter@xxxxxxxxxxxx]
Inviato: giovedì 15 luglio 2004 15.31
A: cobol400 list
Oggetto: [COBOL400-L] newbie: simple file output problem, debugging


Hi all.

My program runs without complaint, but when I check the output file, it
seems to be totally empty.  It used to complain, but then I started
calling it after creating an output file with the following command:

  CRTPF FILE(MYLIB/THEFILE) RCDLEN(16384) FILETYPE(*DATA) MBR(*FILE)

The COBOL contains blocks like these:

file-control.
   select thefile assign to thefile.
data division.
file section.
 fd  thefile.
 01  named-rec          pic x(16384).

[omit working-storage, linking sections, procedure division header]
[inside main procedure:]

open output thefile
perform set-named-rec-value
if return-code = 0
  write named-rec
end-if
close thefile
.

Do I need to create the output file in a different way?  Am I not telling
the COBOL program enough about file?

I also don't know how to debug the running COBOL program to check whether
named-rec is being set correctly.  I'm on V5R2.

Thanks,

-Jared

_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.