ABOUT GET FILE(SYSIN) EDIT(IN)(COL(n),L) 
Author Message
 ABOUT GET FILE(SYSIN) EDIT(IN)(COL(n),L)

Hello.

I'm using VisualAge PL/I V2.1 Fixpak 5 on Windows NT 4.0WS SP 5.

I tried below source program.
------------------------------
 TEST10:PROC OPTIONS(MAIN);

 DCL IN char(10);
 ON ENDFILE(SYSIN) GOTO CF ;

 OPEN FILE(SYSIN) INPUT ;

 GF :
 GET FILE(SYSIN) EDIT(IN)(COL(1),L);

 PUT FILE (TOUT) EDIT(IN)(L);
 /*PUT FILE (TOUT) SKIP;*/
 GOTO GF ;

 CF:
 CLOSE FILE(SYSIN) ;

 END TEST10;
-----------------------------
I've set
SET DD:SYSIN=TEST.TXT
SET DD:TOUT=TOUT.TXT

TEST.TXT is as below.
---------------------------
1.aaaa
2.bbbb
3.cccc
4.dddd
---------------------------
I compile and execute this program,
TOUT.TXT is as below.
-----------------------------

1.aaaa
2.bbbb
3.cccc
4.dddd
-----------------------------
The first line in TOUT.TXT is a blank line.
But I change
GET FILE(SYSIN) EDIT(IN)(COL(1),L);
to
GET FILE(SYSIN) EDIT(IN)(COL(2),L);
,this result is as below.
-----------------------------
.aaaa
.bbbb
.cccc
.dddd
-----------------------------

When "COL(1)",why is the first line a blank line?
Please tell me.

Thanks,
woolist.

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



Sat, 02 Nov 2002 03:00:00 GMT  
 ABOUT GET FILE(SYSIN) EDIT(IN)(COL(n),L)
Red herring.

Add the LRMSKIP(Y) option to the DD:TOUT. Full details in the programming
guide.


Quote:
> Hello.

> I'm using VisualAge PL/I V2.1 Fixpak 5 on Windows NT 4.0WS SP 5.

> I tried below source program.
> ------------------------------
>  TEST10:PROC OPTIONS(MAIN);

>  DCL IN char(10);
>  ON ENDFILE(SYSIN) GOTO CF ;

>  OPEN FILE(SYSIN) INPUT ;

>  GF :
>  GET FILE(SYSIN) EDIT(IN)(COL(1),L);

>  PUT FILE (TOUT) EDIT(IN)(L);
>  /*PUT FILE (TOUT) SKIP;*/
>  GOTO GF ;

>  CF:
>  CLOSE FILE(SYSIN) ;

>  END TEST10;
> -----------------------------
> I've set
> SET DD:SYSIN=TEST.TXT
> SET DD:TOUT=TOUT.TXT

> TEST.TXT is as below.
> ---------------------------
> 1.aaaa
> 2.bbbb
> 3.cccc
> 4.dddd
> ---------------------------
> I compile and execute this program,
> TOUT.TXT is as below.
> -----------------------------

> 1.aaaa
> 2.bbbb
> 3.cccc
> 4.dddd
> -----------------------------
> The first line in TOUT.TXT is a blank line.
> But I change
> GET FILE(SYSIN) EDIT(IN)(COL(1),L);
> to
> GET FILE(SYSIN) EDIT(IN)(COL(2),L);
> ,this result is as below.
> -----------------------------
> .aaaa
> .bbbb
> .cccc
> .dddd
> -----------------------------

> When "COL(1)",why is the first line a blank line?
> Please tell me.

> Thanks,
> woolist.

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



Mon, 04 Nov 2002 03:00:00 GMT  
 ABOUT GET FILE(SYSIN) EDIT(IN)(COL(n),L)
Thank you for your help.



Quote:
> Red herring.

> Add the LRMSKIP(Y) option to the DD:TOUT. Full details in the
programming
> guide.



> > Hello.

> > I'm using VisualAge PL/I V2.1 Fixpak 5 on Windows NT 4.0WS SP 5.

> > I tried below source program.
> > ------------------------------
> >  TEST10:PROC OPTIONS(MAIN);

> >  DCL IN char(10);
> >  ON ENDFILE(SYSIN) GOTO CF ;

> >  OPEN FILE(SYSIN) INPUT ;

> >  GF :
> >  GET FILE(SYSIN) EDIT(IN)(COL(1),L);

> >  PUT FILE (TOUT) EDIT(IN)(L);
> >  /*PUT FILE (TOUT) SKIP;*/
> >  GOTO GF ;

> >  CF:
> >  CLOSE FILE(SYSIN) ;

> >  END TEST10;
> > -----------------------------
> > I've set
> > SET DD:SYSIN=TEST.TXT
> > SET DD:TOUT=TOUT.TXT

> > TEST.TXT is as below.
> > ---------------------------
> > 1.aaaa
> > 2.bbbb
> > 3.cccc
> > 4.dddd
> > ---------------------------
> > I compile and execute this program,
> > TOUT.TXT is as below.
> > -----------------------------

> > 1.aaaa
> > 2.bbbb
> > 3.cccc
> > 4.dddd
> > -----------------------------
> > The first line in TOUT.TXT is a blank line.
> > But I change
> > GET FILE(SYSIN) EDIT(IN)(COL(1),L);
> > to
> > GET FILE(SYSIN) EDIT(IN)(COL(2),L);
> > ,this result is as below.
> > -----------------------------
> > .aaaa
> > .bbbb
> > .cccc
> > .dddd
> > -----------------------------

> > When "COL(1)",why is the first line a blank line?
> > Please tell me.

> > Thanks,
> > woolist.

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

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


Mon, 25 Nov 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. using a file as sysin in special name?

2. "ls" of only hidden files

3. Enhancing "ls -l" file listing abilities

4. ANN: zip-ls -- Zip file listing program

5. Editing LIB Files to Change Functions Within LIB Files

6. input error code 012 on sysin

7. SYSIN DD Missing without abend?

8. SYSIN DD Missing without abend? -Reply

9. Overriding COBOL II internal sort sysin

10. Topspeed - CW2003 File Convert gets File Not Found

11. getting a file list of files in a ftp server

12. Col. OH: Contracts: Sr Java Architects/Developers

 

 
Powered by phpBB® Forum Software