Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all 8500 articles
Browse latest View live

PL/I & Assembler :: RE: Default attributes for undeclared SYSPRINT in PL/1

$
0
0
Author: prino
Posted: Wed Apr 11, 2018 10:02 pm (GMT 5.5)

steve-myers wrote:
I am no PL/I expert; I can't answer your query directly. I would like to make a couple of observations.
  • Personally, I do not think the PL/I library should be changing the DCB attributes of the data set specified by the DD statement with DD name SYSPRINT. I think this is an issue you should pursue with IBM. Unfortunately there is no truly "right" answer for this issue so you may find IBM's response less than satisfactory to you. Perhaps true PL/I experts might have more input than I can provide.

It doesn't. There are defaults, and they could be found by RTFM. If they are not coded in the JCL or on the DCL SYSPRINT statement, the only thing that actually changes them from the defaults is the use of a DCL 1 PLITABS EXTERNAL structure.

steve-myers wrote:

  • I do not think inserting tab characters into a data set will result in the behavior you expect. No IBM printer that I know about provides a tab type function, and the PL/I library does not seem to respond to tab characters by inserting the appropriate blanks into the final output line.

His TAB variable has nothing to do with tab characters. It's an array of BIT(1) variables. Read about the PLITABS structure to set up columnar output data.

And as for your last two answers/observations, they are not really (or really not...) relevant to the question.

And finally, using DISPLAY to put data on SYSPRINT has only been possible since Enterprise PL/I introduced a compiler option to do so. Normally you should use PUT DATA/PUT LIST/PUT EDIT to print data to SYSPRINT. It's not unlikely that the Runtime library routines that translate DISPLAY (which normally goes to the Console) into a format that goes to SYSPRINT do not respect the default DCB. You should enter an RFE on the IBM developerworks site. (All current PL/I RFEs are @ https://www.ibm.com/developerworks/rfe/execute?use_case=searchRFEs&SAVED_SEARCH_ID=3071 )
_________________
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
At last, a tiny bit of programming here... icon_smile.gif


JCL & VSAM :: RE: VSAM - Accessing beyond record size

$
0
0
Author: Benchwarmer
Posted: Wed Apr 11, 2018 10:24 pm (GMT 5.5)

File is READ in a COBOL program. Lets say the record has the count of 2 and there is no data exists after the second occurrence in input. But the program is checking the occurrence beyond 2 to verify the data exist. I was under the assumption that it will throw an error. In file aid when I open the VSAM file it does not show any values (Not even null) beyond the second occurrence.

Based on your answer, I assume the VSAM data will hold null values for other occurrences and File aid is not showing data because it may use RDW to control the data to be shown.
_________________
Thanks,
Kratos

CICS :: RE: VSAM file NOT Found error while processing in a CICS Program

$
0
0
Author: Robert Sample
Subject: Reply to: VSAM file NOT Found error while processing in a CICS Program
Posted: Wed Apr 11, 2018 11:51 pm (GMT 5.5)

Did you look at the READ command in the Application Programming Reference manual? I did, and it says
Quote:
13 NOTFND
RESP2 values:

80
An attempt to retrieve a record based on the search argument provided is unsuccessful. For data tables, this condition occurs if an attempt to read a record is unsuccessful because there is no entry with the specified key in the data table. This does not mean that there is no such record in the source data set (if the table was created from one); it may be that such a record is present but was either rejected during initial loading by the user exit XDTRD, or was subsequently deleted from the data table. For remote files, this condition occurs if an attempt to read a record is made without keylength specified either in the application or the file definition, and the actual key is longer than 4 characters.
In other words, the NOTFND condition means the specific record you were looking for was not found and has nothing to do with the file entry (unless you are using a very old version of CICS, the FCT no longer exists as RDO definition replaced it some years back). You specified you wanted to read a single key value AND ONLY THAT KEY VALUE from the data set; what did you think would happen when that record key is not in the data set?
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

JCL & VSAM :: RE: VSAM - Accessing beyond record size

$
0
0
Author: Robert Sample
Posted: Wed Apr 11, 2018 11:57 pm (GMT 5.5)

You are defining a variable length record in COBOL. You REALLY need to read up in the Language Reference and Language Guide manuals how COBOL handles variable length records. If VSAM-OCCUR-CT has 02 in it, the record will have 2 occurrences of VSAM-DATA-SEG and hence of VSAM-NAME; there will be no data read after those 2 occurrences since no data exists in the VSAM data set for occurrences 3 through 10. One of the differences between FD 01 and WORKING-STORAGE 01 is that WORKING-STORAGE will reserve memory for all 10 occurrences even if only 2 are defined; FD 01 only has the amount of memory required for the actual number of occurrences.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

JCL & VSAM :: RE: VSAM - Accessing beyond record size

$
0
0
Author: Benchwarmer
Posted: Thu Apr 12, 2018 1:12 am (GMT 5.5)

Quote:
You REALLY need to read up in the Language Reference and Language Guide manuals how COBOL handles variable length records


Yes, I definitely do need to read the manual.



Quote:
FD 01 only has the amount of memory required for the actual number of occurrences.


VSAM layout is defined in FD and still the program refers to occurrence beyond the count.
_________________
Thanks,
Kratos

JCL & VSAM :: RE: VSAM - Accessing beyond record size

$
0
0
Author: Robert Sample
Posted: Thu Apr 12, 2018 1:27 am (GMT 5.5)

Quote:
still the program refers to occurrence beyond the count.
Change the code! The Language Reference manual tells you
Quote:
After a READ statement is executed, only those data items within the range of the current record are replaced; data items stored beyond that range are undefined
In other words, your program may refer to occurrences 3 through 10 when VSAM-OCCUR-CT is 02; however, the data being referenced is undefined. You could potentially get storage abends (although that is not likely in this case) but you could definitely get incorrect data in those occurrences! What I've seen in such cases (through Enterprise COBOL 3.4 -- I haven't seen any such case in the more recent COBOL versions) is that generally the first 5 READ statements will have the next record or records in the extra occurrences; after the first 5 READ statements the extra occurrences will have either data from the 5th previous READ or data from the next record or records (depending upon the specific values for VSAM-OCCUR-CT in the various records). This is for sequential data sets; I don't recall ever seeing this for VSAM so I don't know what it would use.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

JCL & VSAM :: RE: VSAM - Accessing beyond record size

$
0
0
Author: Benchwarmer
Posted: Thu Apr 12, 2018 3:06 am (GMT 5.5)

Thank you. It helps.
_________________
Thanks,
Kratos

PL/I & Assembler :: RE: Default attributes for undeclared SYSPRINT in PL/1

$
0
0
Author: Alan Playford
Posted: Thu Apr 12, 2018 2:37 pm (GMT 5.5)

Thank you both Steve and Prino for replying.

This program, unfortunately, is one of a couple of thousand that we inherited to run for another Customer, and so - although we wouldn't advocate doing anything like this in the same way - our hands are a little tied if we don't want to have to change the program and/or JCL for these 2000+ instances?

Agree that TAB is confusing here, and it's really short for TABLE I guess?
Not that "tabbing" in a DISPLAY statement shouldn't work, as it's only laying out the print line ready for display on the output device.

Online docs variously say SYSPRINT defaults to a STREAM PRINT environment but some say 121 bytes, others say VB, and there appears to be no definite statement to tell you just what DCB parameters it assigns it with.

Appreciate you taking the time and trouble to reply, guys.
_________________
Alan Playford


CICS :: RE: VSAM file NOT Found error while processing in a CICS Program

$
0
0
Author: SumaReva
Subject: Reply to: VSAM file NOT Found error while processing in a CICS Program
Posted: Thu Apr 12, 2018 10:28 pm (GMT 5.5)

Thank you Robert for your reply.
I did look at the CICS Language Guide. The Dataset has values and the Key specified is (20,0) and the same is specified in RIDFLD while performing READ DATASET.
The VSAM file used was delete Defined and FCT entries were refreshed. Still Facing the same issue.
Please Help:

Time . . . . . : 10:35:42.315309 Function code : 0602
Trace type . . : EXECOUT Command . . . : READ
Program . . . . : CMMXXX File ID . . . : VSHIPVRY
Offset . . . . : 9CA EIBRESP . . . : 13 (NOTFND)
Elapsed time . : 00:06:01.020455 EIBRESP2 . . . : X'00000050'
EIBRCODE . . . : X'810000000000'

CLIST & REXX :: How to list data set names with different HLQ?

$
0
0
Author: murali.andaluri
Subject: How to list data set names with different HLQ?
Posted: Thu Apr 12, 2018 11:33 pm (GMT 5.5)

Hi,

I am new to REXX and started writing small programs to automate few things.
I am writing a program to read SSO to find out execution time of each job.
I achieved logic by using Parse, but challenge i am facing is listing data set names. My job names starts with IS*, IF*, IB*. I cant give I* because there are huge number of jobs with it.

below is my code:
DATFILE='SSO.D*.T*' || JDATE || '.' || 'IS*'
DSVAR = ''
"ISPEXEC LMDINIT LISTID(IDV) LEVEL("DATFILE")
DO FOREVER
"ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR)"

If i use above code it is listing only jobs with IS*, but i need IF* and IB* as well, can someone help me how to achieve this?
Note: i can not use I* since there is huge list of jobs.
_________________
Thanks,
Murali

CICS :: RE: VSAM file NOT Found error while processing in a CICS Program

$
0
0
Author: Robert Sample
Posted: Thu Apr 12, 2018 11:42 pm (GMT 5.5)

Quote:
The VSAM file used was delete Defined and FCT entries were refreshed.
This has nothing to do with your problem. The NOTFND has NOTHING to do with the definition of the CICS file. Until you accept this, you CANNOT resolve the issue.

Quote:
The Dataset has values and the Key specified is (20,0) and the same is specified in RIDFLD while performing READ DATASET.
What does this mean? Your RIDFLD would have to be a 20-byte variable, so that's not an issue.

If you really want to resolve this issue, use CEDF to step through the code and display the full 20-byte value being used in the EXEC CICS READ statement. Then dump the VSAM KSDS and look for that exact same 20-byte value in the keys. If you find a match, post the screen shot of the CEDF screen after the READ executes, and post at least enough of the VSAM dump to show the key is in the data set. Post the data using the CODE button so spaces are preserved. Until and unless you do this, there is nothing we can do to help you since the problem is -- quite clearly -- being stated that the key you are attempting to read does not exist in the data set.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

CLIST & REXX :: RE: How to list data set names with different HLQ?

$
0
0
Author: daveporcelan
Posted: Fri Apr 13, 2018 12:21 am (GMT 5.5)

What I would do is put your code in an internal subroutine.
I would have the last node be a variable.
I would call this subroutine from an earlier loop.
Example.
Note 1: This is completely untested, but a good start
Note 2: This is just one approach, go ahead guys and beat me up.

Code:
LAST_NODES. = ''
LAST_NODES.1 = 'IS'
LAST_NODES.2 = 'IF'
LAST_NODES.3 = 'IB'
X = 1
DO UNTIL LAST_NODES.X = ''
  CALL LIST_DATASETS
  X = X + 1
END

EXIT

/* SUBROUTINE */
LIST_DATASETS: NOP
LASTNODE = LAST_NODES.X
DATFILE='SSO.D*.T*' || JDATE || '.' ||LASTNODE||'*'
DSVAR = ''
"ISPEXEC LMDINIT LISTID(IDV) LEVEL("DATFILE")
DO FOREVER
"ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR)"
.... MORE CODE.....
RETURN

DB2 :: Handling result sets in the calling Native procedure

$
0
0
Author: Rusikesh
Subject: Handling result sets in the calling Native procedure
Posted: Fri Apr 13, 2018 12:25 am (GMT 5.5)

Hello Team,
I need your inputs on following scenario. i tried multiple things but no luck.
Here is challenge,
I am working on DB2 Native procedure. I created procedure (SP1), and after performing some logic it is returning result into one cursor say CURSOR1. This CURSOR1 is extracting data from GLOBAL TEMPORARY TABLE which is declared in SP1. CURSOR1 is defined WITH RETURN TO CLIENT FOR clause.
Second Stored procedure SP2 is calling SP1, in order to read CURSOR1 (output of SP1) and process it. I tried using ASSOCIATE RESULT SET LOCATOR, however after executing SP2, i see in no result. It is giving error as,
"CURSOR NAME CURSOR1 IS NOT DECLARED".

Here is code which i did in SP2 to process CURSOR1:
ASSOCIATE RESULT SET LOCATOR(result1)
WITH PROCEDURE SCHEMA.SP1
ALLOCATE CURSOR1 CURSOR FOR RESULT SET result1

-- after this I am fetching CURSOR1 and processing it.

========
Note: In SP2 i defined result1 as,
DECLARE result1 RESULT_SET_LOCATOR VARYING;
========
_________________
Thanks,
R

CLIST & REXX :: RE: How to list data set names with different HLQ?

$
0
0
Author: Nic Clouston
Posted: Fri Apr 13, 2018 1:24 am (GMT 5.5)

You are missing
Code:
last_nodes.0 = 3

which then allows
Code:
Do x= 1 to last_nodes.0

instead of the DO UNTIL and later you do not need LASTNODE=LAST_node.x
but have
Code:
DATFILE='SSO.D*.T*' || JDATE || '.' ||LAST_NODE.x||'*'


Just an alternative without changing too much.
_________________
Regards
Nic

DB2 :: RE: Handling result sets in the calling Native procedure

$
0
0
Author: Nic Clouston
Posted: Fri Apr 13, 2018 1:27 am (GMT 5.5)

Please use the code tags when presenting code and data. After so many years as a member you should be familiar with this.
_________________
Regards
Nic


DB2 :: RE: Handling result sets in the calling Native procedure

$
0
0
Author: Rusikesh
Subject: Reply to: Handling result sets in the calling Native procedure
Posted: Fri Apr 13, 2018 4:35 am (GMT 5.5)

Here is code snippet,

CLIST & REXX :: RE: How to list data set names with different HLQ?

$
0
0
Author: Pedro
Subject: Reply to: How to list data set names with different HLQ?
Posted: Fri Apr 13, 2018 5:41 am (GMT 5.5)

just a comment on terminology:

The subject of the post is about HLQ, but the example is about LLQ. The high level qualifier (HLQ) is the leftmost qualifier in the data set name. The low level qualifier (LLQ) is the rightmost qualifier.
_________________
Pedro Vera

DB2 :: RE: Handling result sets in the calling Native procedure

$
0
0
Author: expat
Posted: Fri Apr 13, 2018 11:41 am (GMT 5.5)

Nic Clouston wrote:
Please use the code tags when presenting code and data. After so many years as a member you should be familiar with this.

Rusikesh wrote:
Here is code snippet,
[attachment here]


Spot the difference ............. REQUESTED NE SUPPLIED

Please DO NOT post attachments as
a) Not everyone is permitted to open them
b) Not everyone will trust you that your attachment is safe, I FOR ONE DON'T
c) If you cannot be bothered to post in an easy and open fashion some people may not have enough "bothered" to open your attachment

So tip of the day, help yourself to help yourself.
_________________
Some people are like Slinkies. They have no real value,
but it sure is fun to see them pushed down the stairs.

Suggestions & Feedback :: E-mail notifications

$
0
0
Author: Nic Clouston
Subject: E-mail notifications
Posted: Fri Apr 13, 2018 1:02 pm (GMT 5.5)

I have e-mail notifications set to 'Off' in my profile but, recently, I have been receiving them. This is annoying (very). Can it be sorted, please?
_________________
Regards
Nic

CLIST & REXX :: RE: How to list data set names with different HLQ?

$
0
0
Author: murali.andaluri
Posted: Fri Apr 13, 2018 3:38 pm (GMT 5.5)

Your solution is working!!!
Thank you so much Nic.
_________________
Thanks,
Murali

Viewing all 8500 articles
Browse latest View live