View previous topic :: View next topic
|
Author |
Message |
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
I have to get a input from JCL SYSIN. The Record Length is 150.
How to get it? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Use a dataset instead of instream data.
O. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Quote: |
Use a dataset instead of instream data. |
Only 2 records I am going to get. Thats why I am asked to do using SYSIN. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Make sure your JCL PDS is also LRECL 150. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Quote: |
Make sure your JCL PDS is also LRECL 150. |
This time also, how to give the input? Is there any continuation character available? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
gnanas wrote: |
Is there any continuation character available? |
For what? What program? Standard or third-party utilities have their own unique requirements for continuation - you'll have to look up the details. If it's your program, then it's up to you to define and write the logic. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
It's is standard only. I have to write code.
Quote: |
If it's your program, then it's up to you to define and write the logic. |
I couldn't get this. Could you please explain this in detail? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
the program reads records, the content follows some business logic Ok ?!?
Sysin allows only for 80' bytes records Ok?!?
Now You have TWO Alternatives...
instead of reading ONE RECORD modify the program to read two records
of 80 chars each...
You are lucky that You can identify the two records with a 5 chars token
for example "PART1" and "PART2" the 75 chars left You can use them to
build Your 150 chars thing..
the second way is to write another program or use an utility
to read 2 records an build ONE record from the two...
there is no standard in continuation conventions, everybody chooses one
for jcl a comma is enough ( uses the same char as separator) ,
for idcams the minus sign is used... |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Thanks Enrico Sorichetti for your information.
But, if record is 80 chars also, 2 bytes will be taken by quote('), ie, starting and ending delimiter.
So what can be done? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Why would You need quotes around Your data ??
the five chars of record id were just a sample ,
if You are sure that nobody will make a mistake
the sequence will be enough !!
read first card ,
move card to position 1 for 80 bytes,
read secnd card
move card to position 81 for 70 bytes |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
It may help if you post the "sysin" data and explain how it will be used by the application. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Quote: |
Why would You need quotes around Your data ?? |
The problem is this,
I am getting Address from SYSIN and its length is 80 chars. In PLI program, I use String function to extract the Name, City, State, etc., fields.
When I ran this, I was getting the following error message.
ONCODE=613 The CONVERSION condition was raised because a conversion error occurred when converting character to arithmetic on input or output.
PLI Code:
Code: |
DCL LSTR CHAR(80);
GET LIST(LSTR); |
JCL Code:
Code: |
SYSIN DD *
AAAAAAAAAAAAA..... (upto 80 chars)
/* |
But When I ran the same with below SYSIN, it ran fine. But only 78 chars could be given from SYSIN, ie, starting and ending delimiter as quote I used.
Code: |
SYSIN DD *
'AAAAAAAAAAAAA..... '(only 78 chars)
/* |
So, only 78 chars can be given from SYSIN. Please help me. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Do not use the stream functions "GET LIST...."
use the record functions "READ FILE(...) ...." |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Thanks Enrico Sorichetti.
It's working fine. |
|
Back to top |
|
|
|