View previous topic :: View next topic
|
Author |
Message |
Balu5491
New User
Joined: 01 Aug 2016 Posts: 14 Location: India
|
|
|
|
Hi All,
I have a group variable.
01 WA-DETAILS.
05 WA-NAME PIC X(80) VALUE 'JOHN'.
05 WA-ID PIC X(80) VALUE '1234'.
When i try to write the details into a PS file of LRECL=80,
WRITE OUTPUT-FILE FROM WA-DETAILS.
I am getting the first line written in the PS file, not the second line with ID. Could you please help to identify an option to write two lines. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 418 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
WRITE OUTPUT-FILE FROM WA-DETAILS(01:80).
WRITE OUTPUT-FILE FROM WA-DETAILS(81:80).
I think you're really looking for something else.
Describe what you really want to accomplish. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Please use the code tags when posting stuff that appears on your mainframe screen. Compare below with what is in your post. This is correctly formatted and yours is not even though this was copied from your post.
Code: |
01 WA-DETAILS.
05 WA-NAME PIC X(80) VALUE 'JOHN'.
05 WA-ID PIC X(80) VALUE '1234'. |
Details of how to use the code tags, and others, are all over the place. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Balu5491 wrote: |
Hi All,
I have a group variable.
Code: |
01 WA-DETAILS.
05 WA-NAME PIC X(80) VALUE 'JOHN'.
05 WA-ID PIC X(80) VALUE '1234'. |
When i try to write the details into a PS file of LRECL=80,
WRITE OUTPUT-FILE FROM WA-DETAILS.
I am getting the first line written in the PS file, not the second line with ID. Could you please help to identify an option to write two lines. |
And what makes you think stuffing 160 bytes into a record that can contain only 80 will work?
You're working on z/OS with records, not on Windoze with streams! |
|
Back to top |
|
|
Balu5491
New User
Joined: 01 Aug 2016 Posts: 14 Location: India
|
|
|
|
prino wrote: |
Balu5491 wrote: |
Hi All,
I have a group variable.
Code: |
01 WA-DETAILS.
05 WA-NAME PIC X(80) VALUE 'JOHN'.
05 WA-ID PIC X(80) VALUE '1234'. |
When i try to write the details into a PS file of LRECL=80,
WRITE OUTPUT-FILE FROM WA-DETAILS.
I am getting the first line written in the PS file, not the second line with ID. Could you please help to identify an option to write two lines. |
And what makes you think stuffing 160 bytes into a record that can contain only 80 will work?
You're working on z/OS with records, not on Windoze with streams! |
I want the OUTPUT-FILE with 80 LRECL needs to populated the first WA-NAME variable in first line and WA-ID in the second line.
like
Code: |
***************************** Top of Data ******************************
JOHN
1234
**************************** Bottom of Data **************************** |
|
|
Back to top |
|
|
Balu5491
New User
Joined: 01 Aug 2016 Posts: 14 Location: India
|
|
|
|
dneufarth wrote: |
WRITE OUTPUT-FILE FROM WA-DETAILS(01:80).
WRITE OUTPUT-FILE FROM WA-DETAILS(81:80).
I think you're really looking for something else.
Describe what you really want to accomplish. |
I want the OUTPUT-FILE with 80 LRECL needs to populated the first WA-NAME variable in first line and WA-ID in the second line.
like
Code: |
***************************** Top of Data ******************************
JOHN
1234
**************************** Bottom of Data **************************** |
_________________ |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
If
dneufarth wrote: |
WRITE OUTPUT-FILE FROM WA-DETAILS(01:80).
WRITE OUTPUT-FILE FROM WA-DETAILS(81:80). |
is not good enough, try:
Quote: |
WRITE OUTPUT-FILE FROM WA-NAME.
WRITE OUTPUT-FILE FROM WA-ID. |
|
|
Back to top |
|
|
Balu5491
New User
Joined: 01 Aug 2016 Posts: 14 Location: India
|
|
|
|
I am comfort in using
WRITE OUTPUT-FILE FROM WA-NAME.
WRITE OUTPUT-FILE FROM WA-ID.
Thanks Marso, Robert, Dave. |
|
Back to top |
|
|
|