Hi,This code works

PROGRAM TEST.WRITE
     *Y.AR = ''*
     Y.AR<1> = 'LINE1'
     Y.AR<2> = 'LINE2'
     Y.AR<3> = 'LINE3'
     OPENSEQ '.','TEST.FILE.NAME' TO F.FILE ELSE
         CREATE F.FILE ELSE
             ABORT
         END
     END
     *L.F = CHAR(10)*
*     Y.AR = Y.AR<1>:L.F:Y.AR<2>:L.F:Y.AR<3> ;* Or use CONVERT function if
you need to convert whole array*
     WRITESEQ Y.AR TO F.FILE ELSE
         PRINT 'CANNOT WRITE THE FILE'
     END
     CLOSESEQ F.FILE
     STOP
 END

On Thu, Oct 8, 2009 at 3:28 PM, Kiran <[email protected]> wrote:

>
> Hi Viewer,
>
> I have some code, without using the convert statement. May be it does
> help, or correct me if I am wrong somewhere.
>
>    TEST.WRITE
> 001     PROGRAM TEST.WRITE
> 002
> 003     Y.AR<1> = 'LINE1'
> 004     Y.AR<2> = 'LINE2'
> 005     Y.AR<3> = 'LINE3'
> 006
> 007     OPENSEQ '.','TEST.FILE.NAME' TO F.FILE ELSE
> 008         CREATE F.FILE ELSE
> 009             ABORT
> 010         END
> 011     END
> 012
> 013     WRITESEQ Y.AR TO F.FILE ELSE
> 014         PRINT 'CANNOT WRITE THE FILE'
> 015     END
> 016
> 017     CLOSESEQ F.FILE
> 018
> 019     STOP
> 020
> 021 END
>
> Thanks,
> Kiran.
>
> On Oct 7, 8:22 pm, "Jim Idle" <[email protected]> wrote:
> > CONVERT @AM IN ARR TO CHAR(10)
> >
> > WRITESEQ ARR.....
> >
> > Jim
> >
> > From: [email protected] [mailto:[email protected]] On Behalf
> Of anandasundaram jeyaraj
> > Sent: Tuesday, October 06, 2009 11:24 PM
> > To: [email protected]
> > Subject: reg linefeed in WRITESEQ
> >
> > Hi,
> >
> > I am trying to update a sequential file with a values of an array.
> >
> > say ARR<1> = VALUE1
> >
> >       ARR<2> = VALUE2
> >
> >       ARR<3> = VALUE3
> >
> > I want to write the contents of the array in one shot with linefeed
> between each values
> >
> > such that it appears in the sequential file as
> >
> > VALUE1
> >
> > VALUE2
> >
> > VALUE3
> >
> > thanks
> >
> > anand
>
> >
>


-- 
Igor Micev

--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to