View previous topic :: View next topic
|
Author |
Message |
sraghav
New User
Joined: 16 Sep 2009 Posts: 3 Location: hyderabad
|
|
|
|
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 |
|
|
VVRAVINDRA
New User
Joined: 04 Aug 2008 Posts: 46 Location: Chennai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
sraghav
New User
Joined: 16 Sep 2009 Posts: 3 Location: hyderabad
|
|
|
|
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 |
|
|
sraghav
New User
Joined: 16 Sep 2009 Posts: 3 Location: hyderabad
|
|
|
|
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 |
|
|
Shriram Jogdand
New User
Joined: 14 Oct 2008 Posts: 65 Location: Pune
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|