Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Input through JCL

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

Active Member


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

PostPosted: Tue Nov 27, 2007 8:06 pm    Post subject: Input through JCL
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: 2360
Location: Israel

PostPosted: Tue Nov 27, 2007 8:07 pm    Post subject:
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: 788
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 8:09 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Nov 27, 2007 8:20 pm    Post subject: Reply to: Input through JCL
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: 788
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 9:05 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Nov 27, 2007 9:13 pm    Post subject:
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: 788
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 9:17 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Nov 27, 2007 9:29 pm    Post subject: Reply to: Input through JCL
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: 788
Location: Chennai, India

PostPosted: Tue Nov 27, 2007 9:42 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Nov 27, 2007 9:55 pm    Post subject: Reply to: Input through JCL
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

Site Director


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

PostPosted: Wed Nov 28, 2007 12:39 am    Post subject:
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: 788
Location: Chennai, India

PostPosted: Wed Nov 28, 2007 1:39 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Nov 28, 2007 1:51 pm    Post subject: Reply to: Input through JCL
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: 788
Location: Chennai, India

PostPosted: Wed Nov 28, 2007 2:03 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Need input in Scheduling Benchwarmer CA Products 5 Tue Jun 06, 2017 1:44 am
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us