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

can we pass /* or //* thru SYSIN DD *


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sraghav

New User


Joined: 16 Sep 2009
Posts: 3
Location: hyderabad

PostPosted: Tue Dec 08, 2009 6:02 pm
Reply with quote

Hi,

Can we pass //* or /* or // as data through SYSIN DD *.

I was asked the above question in an interview. I had answered that we cannot pass them as specifying them would mark the end of the instream data (or the job in case of //).
But then it occurred to me that /* or //* or // might not be considered as a delimiter unless specified in the first column in the JCL. So we can specify them in a column other than the first while passing them thru SYSIN.
So anyone please shed some light on the above as I do not have mainframe connection to try it out.
Thanking you in advance
Sandhya
Back to top
View user's profile Send private message
VVRAVINDRA

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Tue Dec 08, 2009 6:11 pm
Reply with quote

Hi,

I don't really know with what intention the interviewer had asked this question and also, could you please let us know some more details like whether the calling step is a IDCAMS or IEBGENER.......
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Dec 08, 2009 6:20 pm
Reply with quote

Click on the manuals link at the top of the page, pull up the JCL Language Reference manual, and research the DLM parameter. It can be applied to any instream data set without regard to being part of program IDCAMS, IEBGENER, or whatever.
Back to top
View user's profile Send private message
sraghav

New User


Joined: 16 Sep 2009
Posts: 3
Location: hyderabad

PostPosted: Thu Dec 10, 2009 3:36 pm
Reply with quote

The interviewer specified about passing the // or /* or //* to a cobol program.

Found the below info from the manual:

In a JES2 system, when the DLM delimiter appears on a DD * statement, either the assigned delimiter or // ends the input data set. When the DLM delimiter appears on a DD DATA statement, only the assigned delimiter ends the input data set.

In a JES3 system, when the DLM delimiter appears on either a DD * or DD DATA statement, only the assigned delimiter ends the input data set.
Example:
//DD1 DD *,DLM=AA
.
.
data
.
AA

Thank u Robert..

Regards
Sandhya
Back to top
View user's profile Send private message
sraghav

New User


Joined: 16 Sep 2009
Posts: 3
Location: hyderabad

PostPosted: Thu Dec 10, 2009 3:40 pm
Reply with quote

Forgot to add the below info from the manual:

Purpose

Use the DLM parameter to specify a delimiter to terminate this in-stream data set. When the DLM parameter assigns a different delimiter, the in-stream data records can include standard delimiters, such as /* and //, in the data.

Regards
Sandhya
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Dec 10, 2009 4:32 pm
Reply with quote

We can Pass the data through SYSIN DD * parameter to the cobol program. In cobol program you have to define the structure of variable in Linkage section as follows

LINKAGE SECTION.
01 WS-SYSIN-VAR
05 WS-VAR-LN PIC S9(4) COMP.
05 WS-VARIABLE PIC X(10).

The first variable is length variable and scond is the variable that will be used to store the value passed from SYSIN DD *

You have to accept this value in procedure division with the verb ACCEPT as

ACCEPT WS-VARIABLE
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 10, 2009 4:46 pm
Reply with quote

Shriram Jogdand

Not being a programmer so may well be wrong, but aren't you describing accepting input from PARM here, rather than from SYSIN.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Dec 10, 2009 6:11 pm
Reply with quote

Shriram: your post is completely irrelevant to the requested information -- PARM= is a parameter on the EXEC statement, not part of a SYSIN DD statement.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
No new posts EIBCALEN 0 even if we pass LEN and FR... CICS 4
Search our Forums:

Back to Top