Get Edit Problem 
Author Message
 Get Edit Problem

Hi all!

I'm migrating a host application developed using PL/I to
a PC application using VisualAge PL/I V2.1 FP4.
I would like to know how to get text data.

Host is 80byte per 1 Record,but PC is a variable-length record.
When I run a source code as below,for getting 80 byte,
PC application gets next records until getting 80 byte.
A text file's 1 line is from 20 characters to 60.
=============
GET EDIT(CH80)(COL(1),A(80));
=============
I would like to know how to get data one record by one record
from a text file on PC without changing "A(80)" into "L".

I tried "set dd:sysin=test.txt,TYPE(CRLF)",but there is no change.

Please tell me.

Thanks.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 10 Aug 2002 03:00:00 GMT  
 Get Edit Problem
Have you tried "set dd:sysin=test.txt,LRECL(80)"  ? It's just an idea.
Regards,
Peter



Quote:
> Hi all!

> I'm migrating a host application developed using PL/I to
> a PC application using VisualAge PL/I V2.1 FP4.
> I would like to know how to get text data.

> Host is 80byte per 1 Record,but PC is a variable-length record.
> When I run a source code as below,for getting 80 byte,
> PC application gets next records until getting 80 byte.
> A text file's 1 line is from 20 characters to 60.
> =============
> GET EDIT(CH80)(COL(1),A(80));
> =============
> I would like to know how to get data one record by one record
> from a text file on PC without changing "A(80)" into "L".

> I tried "set dd:sysin=test.txt,TYPE(CRLF)",but there is no change.

> Please tell me.

> Thanks.

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sat, 10 Aug 2002 03:00:00 GMT  
 Get Edit Problem

Quote:

> I'm migrating a host application developed using PL/I to
> a PC application using VisualAge PL/I V2.1 FP4.
> I would like to know how to get text data.

> Host is 80byte per 1 Record,but PC is a variable-length record.
> When I run a source code as below,for getting 80 byte,
> PC application gets next records until getting 80 byte.
> A text file's 1 line is from 20 characters to 60.
> =============
> GET EDIT(CH80)(COL(1),A(80));
> =============
> I would like to know how to get data one record by one record
> from a text file on PC without changing "A(80)" into "L".

You'll need "L".  And VARYING attribute.

Quote:
> I tried "set dd:sysin=test.txt,TYPE(CRLF)",but there is no change.

That's right.  The A(80) ensures that 80 characters are always read in.
Quote:

> Please tell me.

> Thanks.



Sat, 10 Aug 2002 03:00:00 GMT  
 Get Edit Problem
Since all you want to do is to read all the characters from each line
into the variable CH80, why not change CH80 to be a varying length
string, switch to RECORD oriented io and use

READ FILE(SYSIN) INTO(CH80);

then just run your processing loop from 1 to LENGTH(CH80) instead of
from 1 to 80.

If for some reason the program logic requires CH80 remain a fixed length
string of length 80 you may need to use the ENVIRONMENT option to
specify that the input file consists of varying length records.  I
presume the compiler you are using supports the ENVIRONMENT option.



Sat, 10 Aug 2002 03:00:00 GMT  
 Get Edit Problem
If you can guarantee that your input is 80 chars, used
TYPE(FIXED),LRECL(80).
If you can't, then the file is not the same, and you will have to change
your program. TYPE(CRLF) is variable length records, and your GET wouldn't
work on MVS either.
You clearly state that you PC files are not host compatible, so why do you
expect your code to work? Change A(80) to L.


Quote:
> Hi all!

> I'm migrating a host application developed using PL/I to
> a PC application using VisualAge PL/I V2.1 FP4.
> I would like to know how to get text data.

> Host is 80byte per 1 Record,but PC is a variable-length record.
> When I run a source code as below,for getting 80 byte,
> PC application gets next records until getting 80 byte.
> A text file's 1 line is from 20 characters to 60.
> =============
> GET EDIT(CH80)(COL(1),A(80));
> =============
> I would like to know how to get data one record by one record
> from a text file on PC without changing "A(80)" into "L".

> I tried "set dd:sysin=test.txt,TYPE(CRLF)",but there is no change.

> Please tell me.

> Thanks.

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Tue, 13 Aug 2002 03:00:00 GMT  
 Get Edit Problem
Thank you for your help and advise.



Quote:
> If you can guarantee that your input is 80 chars, used
> TYPE(FIXED),LRECL(80).
> If you can't, then the file is not the same, and you will have to
change
> your program. TYPE(CRLF) is variable length records, and your GET
wouldn't
> work on MVS either.
> You clearly state that you PC files are not host compatible, so why
do you
> expect your code to work? Change A(80) to L.



> > Hi all!

> > I'm migrating a host application developed using PL/I to
> > a PC application using VisualAge PL/I V2.1 FP4.
> > I would like to know how to get text data.

> > Host is 80byte per 1 Record,but PC is a variable-length record.
> > When I run a source code as below,for getting 80 byte,
> > PC application gets next records until getting 80 byte.
> > A text file's 1 line is from 20 characters to 60.
> > =============
> > GET EDIT(CH80)(COL(1),A(80));
> > =============
> > I would like to know how to get data one record by one record
> > from a text file on PC without changing "A(80)" into "L".

> > I tried "set dd:sysin=test.txt,TYPE(CRLF)",but there is no change.

> > Please tell me.

> > Thanks.

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 24 Aug 2002 03:00:00 GMT  
 Get Edit Problem
Thank you for your help and advise.



Quote:
> If you can guarantee that your input is 80 chars, used
> TYPE(FIXED),LRECL(80).
> If you can't, then the file is not the same, and you will have to
change
> your program. TYPE(CRLF) is variable length records, and your GET
wouldn't
> work on MVS either.
> You clearly state that you PC files are not host compatible, so why
do you
> expect your code to work? Change A(80) to L.



> > Hi all!

> > I'm migrating a host application developed using PL/I to
> > a PC application using VisualAge PL/I V2.1 FP4.
> > I would like to know how to get text data.

> > Host is 80byte per 1 Record,but PC is a variable-length record.
> > When I run a source code as below,for getting 80 byte,
> > PC application gets next records until getting 80 byte.
> > A text file's 1 line is from 20 characters to 60.
> > =============
> > GET EDIT(CH80)(COL(1),A(80));
> > =============
> > I would like to know how to get data one record by one record
> > from a text file on PC without changing "A(80)" into "L".

> > I tried "set dd:sysin=test.txt,TYPE(CRLF)",but there is no change.

> > Please tell me.

> > Thanks.

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 24 Aug 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Edit drop list Edit in place - problem

2. REXX DLL problems solved (was Re: Problems getting C subcommand to work)

3. Editing part of a record in InLine Editing

4. Prohibit editing records when already being edited

5. Can not edit my program, I know about edit mode

6. Real Editing w/ E edit descriptor question

7. Problem with Editing in J

8. Listbox inline edit problems

9. Edit in place problem

10. Problem with browse window - loss of current record after edit

11. More problems with edit in place.

12. Problem with Locus ABC template+RTF Edit control

 

 
Powered by phpBB® Forum Software