IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Input through JCL


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 8:06 pm
Reply with quote

I have to get a input from JCL SYSIN. The Record Length is 150.
How to get it?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Nov 27, 2007 8:07 pm
Reply with quote

Use a dataset instead of instream data.

O.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 8:09 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 27, 2007 8:20 pm
Reply with quote

Make sure your JCL PDS is also LRECL 150.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 9:05 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 27, 2007 9:13 pm
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 9:17 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Nov 27, 2007 9:29 pm
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 9:42 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Nov 27, 2007 9:55 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 28, 2007 12:39 am
Reply with quote

Hello,

It may help if you post the "sysin" data and explain how it will be used by the application.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed Nov 28, 2007 1:39 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Nov 28, 2007 1:51 pm
Reply with quote

Do not use the stream functions "GET LIST...."
use the record functions "READ FILE(...) ...."
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed Nov 28, 2007 2:03 pm
Reply with quote

Thanks Enrico Sorichetti.

It's working fine.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts force tablespace using LISTDEF input DB2 1
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top