× 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.



Are you sure MYLIB is in the library-list?

Are there other THEFILE's on the system?


----- Original Message ----- 
From: "jared" <jhunter@xxxxxxxxxxxx>
To: "cobol400 list" <cobol400-l@xxxxxxxxxxxx>
Sent: Thursday, July 15, 2004 9:30 AM
Subject: [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:
Replies:

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.