Quantcast
Viewing all 8500 articles
Browse latest View live

COBOL Programming :: RE: Problem in writing Output file

Author: RahulG31
Subject: Reply to: Problem in writing Output file
Posted: Mon Nov 14, 2016 11:59 pm (GMT 5.5)

You didn't tell:

1. How many rows your cursor is expected to produce ?
2. What is 'x' in Fetch first x rows only, that worked ?
3. How much space have you increased ?

It may happen that your cursor is producing 1000 rows and your output file may have space for only 10 records and then you increase space to accommodate another 10 rows, which is still way behind the expected 1000.

.


COBOL Programming :: RE: Problem in writing Output file

Author: Robert Sample
Posted: Tue Nov 15, 2016 12:50 am (GMT 5.5)

Quote:
I increased space of file and also tried with max region for the job but still getting same error.
First, the region size will have absolutely NOTHING to do with your problem -- so why are you changing it? Changing random things hoping the problem will go away is NOT a valid debugging method. Increasing the data set (note that it is NOT a "file") space may resolve the file status 34, but it depends on why the file status 34 occurred.

Second, the file status 34 may be the direct cause of the S0C4 ABEND. You've posted nothing that would allow us to help you determine this, though.

Third, the file status 34 may have nothing to do with the S0C4 ABEND. Again, you've posted nothing that would allow us to help you determine this.
_________________
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

COBOL Programming :: RE: Problem in writing Output file

Author: Terry Heinze
Posted: Tue Nov 15, 2016 2:33 am (GMT 5.5)

Look up File Status Key in the Language Reference Manual.
_________________
.... Terry

COBOL Programming :: RANDOM Function in COBOL

Author: swapnil781
Subject: RANDOM Function in COBOL
Posted: Tue Nov 15, 2016 6:17 pm (GMT 5.5)

Hi,

I am trying to write a new COBOL program that can estimate PI by simulating ‘Buffon’s needle’ experiment. I am trying to use the RANDOM function but not able to get the desired results. Requires help for more inputs on RANDOM function, I tried in the Manual but did not get the required help.

Inputs in pgm.
Distance-between- lines (eg. 100 for 100 mm.)
Needle-length (eg.40 for 40 mm)
Needle-drops (eg 1000 )

Buffons Needle formula Pi = 2 * L /(X * P)
To calculate the value 'P' I am using RANDOM function but not able to get the same.
_________________
Thanks,
Swapnil

COBOL Programming :: RE: RANDOM Function in COBOL

Author: Akatsukami
Posted: Tue Nov 15, 2016 6:25 pm (GMT 5.5)

Duplicate of thread on another board; locked.
_________________
Data is not information.
Information is not knowledge.
Knowledge is not wisdom.

COBOL Programming :: RE: RANDOM Function in COBOL

Author: Robert Sample
Subject: Reply to: RANDOM Function in COBOL
Posted: Tue Nov 15, 2016 6:26 pm (GMT 5.5)

Is this for IBM's contest? There was the exact same topic on the Beginner's and Student's Forum the other day. I will repeat my comments from that forum:

The Enterprise COBOL Language Reference manual tells you plenty about the seed for RANDOM:
The seed value can be whatever you want between 0 and 2147483645 (in COBOL 5.1).
The seed value is only needed for the first use of RANDOM; after that, if no parameter is passed to RANDOM the next value in the current sequence will be returned.
If you don't specify a seed value the first call, RANDOM uses zero.
For any given seed value, the pseudorandom sequence returned will be the same.

So for simplicity of testing you probably want to use a constant for the seed value; for your actual run(s) you probably want to use something that will vary (based on time, for example -- calculate seconds elapsed today / this week / this month or this year). Note that the value returned by RANDOM needs to be stored in a COMP-1 or COMP-2 variable since it represents a floating point value between 0 and 1.
_________________
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

DFSORT/ICETOOL :: RE: How to update a portion of text in a trailer record

Author: Trinadh
Posted: Tue Nov 15, 2016 7:36 pm (GMT 5.5)

Thanks Arun, that way it worked successfully.

Bill,

I came across an example 3 in the below link of using multiple OUTREC, one for each OUTFIL.
Link: https://www.ibm.com/support/knowledgecenter/SSLTBW_1.13.0/com.ibm.zos.r13.icea100/ofendex.htm

Also I tried the below code and couldn't get the perfect count in the trailer record after the file split. Assume my input file has 90 records and each split may contain 30 records. The below sort is throwing (no it isn't - it is showing a) record count of 100 in the trailer record in all the three split files.



Code:
 SORT FIELDS=COPY                                     

 OUTFIL FILES=01,                                     
    INCLUDE=(1,3,CH,EQ,C'HDR',OR,25,3,CH,EQ,C'XXX'),
    IFTHEN=(WHEN=(5,5,CH,EQ,'TRAIL'),
        BUILD=(1:C'TR1',4,26,30,4,UFF,M11,LENGTH=4))
  OUTFIL FILES=02,                                     
    INCLUDE=(1,3,CH,EQ,C'HDR',OR,25,3,CH,EQ,C'YYY'),
    IFTHEN=(WHEN=(5,5,CH,EQ,'TRAIL'),
        BUILD=(1:C'TR2',4,26,30,4,UFF,M11,LENGTH=4))
 OUTFIL FILES=03,                                     
    INCLUDE=(1,3,CH,EQ,C'HDR',OR,25,3,CH,EQ,C'ZZZ'),
    IFTHEN=(WHEN=(5,5,CH,EQ,'TRAIL'),
        BUILD=(1:C'TR3',4,26,30,4,UFF,M11,LENGTH=4))

Thanks for your help.

RE CODE' D
_________________
3NADH

DFSORT/ICETOOL :: RE: How to update a portion of text in a trailer record

Author: Bill Woodger
Subject: Reply to: How to update a portion of text in a trailer record
Posted: Tue Nov 15, 2016 7:53 pm (GMT 5.5)

Well, no you didn't. OUTREC is a parameter on OUTFIL, is what you discovered in the example. This is entirely different from... OUTREC. Note the comma indicating a continuation. All that OUTREC on OUTFIL is, is BUILD.

DFSORT/ICETOOL :: RE: How to update a portion of text in a trailer record

Author: Trinadh
Posted: Wed Nov 16, 2016 1:58 am (GMT 5.5)

Thanks for the clarification, Bill.
_________________
3NADH

IMS DB/DC :: IMS Database backup info

Author: ashek15
Subject: IMS Database backup info
Posted: Wed Nov 16, 2016 5:29 am (GMT 5.5)

Dear All

We have a requirement where-in we need to get info/report on successful and failed backups of IMS databases on daily basis. Kindly let me know how to go about this. Thanks in advance.

Regards
Abhishek
_________________
I am a DB2 DBA

IMS DB/DC :: RE: IMS Database backup info

Author: Robert Sample
Posted: Wed Nov 16, 2016 6:00 am (GMT 5.5)

Most scheduling software allows for notification of job completions (both successes and failures). Contact your site support group and work with them to get the appropriate notifications set up in your scheduling software.
_________________
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

IMS DB/DC :: RE: IMS Database backup info

Author: ashek15
Subject: Reply to: IMS Database backup info
Posted: Wed Nov 16, 2016 6:18 am (GMT 5.5)

Hi Robert - Are you referring to notification when a backup jcl completes/fails? We already have that mechanism in place. I am actually looking for options similar to querying a DB2 catalog table SYSIBM.SYSCOPY for backup info for DB2. Can similar info be gathered from DBRC etc?
_________________
I am a DB2 DBA

IMS DB/DC :: RE: IMS Database backup info

Author: Robert Sample
Posted: Wed Nov 16, 2016 6:49 am (GMT 5.5)

Perhaps you should make up your mind what you want to know BEFORE you post a query? Your title talks about IMS; your last post talks about DB2. You can do things in DB2 you cannot do in IMS and vice versa. Comparing their capabilities is rarely a worthwhile exercise.
_________________
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

IMS DB/DC :: RE: IMS Database backup info

Author: ashek15
Subject: Reply to: IMS Database backup info
Posted: Wed Nov 16, 2016 10:02 am (GMT 5.5)

I just gave reference of DB2 to explain what I am looking for. I am aware that IMS and DB2 are completely different. But my query is purely related to IMS.
_________________
I am a DB2 DBA

IMS DB/DC :: RE: IMS Database backup info

Author: enrico-sorichetti
Subject: Reply to: IMS Database backup info
Posted: Wed Nov 16, 2016 12:12 pm (GMT 5.5)

most probably the info You look for is available in the RECON datasets
_________________
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort Image may be NSFW.
Clik here to view.
icon_cool.gif


IMS DB/DC :: RE: IMS Database backup info

Author: PeterHolland
Posted: Wed Nov 16, 2016 12:17 pm (GMT 5.5)

If you have some kind of automation that traps messages you could look for the following messages (probably not complete list) :

DFS3144A
DFS3726A
DFS3145A
DFS0300I
IMS abend 0225

CICS :: CICS Roll back partially - Need to retain log file

Author: dwijadas
Subject: CICS Roll back partially - Need to retain log file
Posted: Wed Nov 16, 2016 4:30 pm (GMT 5.5)

Hi,

I have a situation where roll back is issued but log file shouldn't roll back.

All files are VSAM. At this moment I am thinking of coding the log file update outside of the SYNC-COMMIT block.

Any other idea ?

Thank you.

CICS :: RE: CICS Roll back partially - Need to retain log file

JCL & VSAM :: FTP - JCL failed while passing FTP commands in dataset

Author: Suneetha1612
Subject: FTP - JCL failed while passing FTP commands in dataset
Posted: Wed Nov 16, 2016 7:33 pm (GMT 5.5)

Hi Everyone,

In my job,
Step1 - I am generating FTP commands and writing into a file &TEMP1.
CD \PATH1\PATH2\
DIR
DELETE FILENAME.txt
DIR
QUIT
Step2 - I am executing the FTP commands in &TEMP1 using FTPWEB PROC if only STEP1 is succesful.

When I am running this Job it failed with an error 696.
----------------------------------------------------------------
STEP1 STEP2 - STEP WAS EXECUTED - COND CODE 0696

EZA1789I PASSWORD:
EZA1701I >>> PASS
230 User logged in.
EZA1460I Command:
EZA1735I Std Return Code = 99000, Error Code = 00012
EZA1701I >>> QUIT
221 Goodbye.
----------------------------------------------------------------

I used to run similar job through PUT and GET commands. And they are successful. But it is failed when DELETE command is used.

Please help!!!
_________________
Suneetha.P

JCL & VSAM :: RE: FTP - JCL failed while passing FTP commands in dataset

Author: Akatsukami
Posted: Wed Nov 16, 2016 8:05 pm (GMT 5.5)

And what does the documentation say is the cause of return code 99000 from FTP?
_________________
Data is not information.
Information is not knowledge.
Knowledge is not wisdom.

Viewing all 8500 articles
Browse latest View live