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

COBOL Programming :: RE: Unable to create multiple files using BPXWDYN

$
0
0
Author: Robert Sample
Posted: Fri May 05, 2017 6:22 pm (GMT 5.5)

You need to call BPXWDYN with a request type of FREE after you close OT-FILE the first time. Otherwise, OTFILE remains allocated to your first file until the end of the job step (or job).
_________________
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: Unable to create multiple files using BPXWDYN

$
0
0
Author: Nic Clouston
Posted: Fri May 05, 2017 6:23 pm (GMT 5.5)

For a start you are using the same DDNAME for your allocated dataset (not a "file" on mainframe). Try using different DDNAMEs for each allocation.
_________________
Regards
Nic

COBOL Programming :: RE: Unable to create multiple files using BPXWDYN

$
0
0
Author: mbattu
Posted: Fri May 05, 2017 6:32 pm (GMT 5.5)

Thank you so much Robert. It worked when I used CLOSE command along with ALLOCATE.


Hi Nic, the reason I am using only one DDNAME is the number of files I use vary and can't be determined before. Using CLOSE command I can use the same for multiple files.

Thank you both for the response.

COBOL Programming :: RE: Getting error while opening a variable block file

$
0
0
Author: Robert Sample
Posted: Sat May 06, 2017 12:09 am (GMT 5.5)

Also, you should be able to check your compiler output to see what the file is listed as -- depending upon how you code your program, it is not uncommon for COBOL to consider a variable length file to be fixed length, which would cause a non-zero file status code when you open the file (most likely a 39 but if the data set is VSAM it could be 92).
Code:
Source   Hierarchy and                                    Base      Displacement  Asmblr Data                      Data Def     
LineID   Data Name                                        Locator     Structure   Definition        Data Type      Attributes   
     2  PROGRAM-ID MF0022------------------------------------------------------------------------------------------------------*
    31   FD VSAM-FILE . . . . . . . . . . . . . . . . . . BLF=00001                                 VSAM           F             
    32   1  VSAM-RECORD . . . . . . . . . . . . . . . . . BLF=00001               DS 0CL1000        Group                       
This Enterprise COBOL output extract shows a fixed length VSAM data set. For a variable length VSAM data set, the F under Data Def Attributes would be a V.
_________________
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

DB2 :: DSNACCOX (can it be run on 1 db/ts, total completion time)

$
0
0
Author: SRICOBSAS
Subject: DSNACCOX (can it be run on 1 db/ts, total completion time)
Posted: Sat May 06, 2017 12:59 am (GMT 5.5)

Hi DB2 Experts,

I am involved in a project which uses CA programming tools to develop utilities for z/OS DB2 and IMS. My team is purely into development and nobody has DB2 DBA knowledge. We dont have a DBA to whom we can ask questions.

In my subsequent posts I will explain how we do the development for aiding DB2 operations without the prescence of a DBA. At this time I would be grateful if the experts could help me out on info on DSNACCOX- I am not able to find it in Google.

Is it possible to run DSNACCOX on specific databases / tablespaces rather than the entire DB2 subsystem? (I checked the parameters for DSNACCOX but couldnt find any IN param for DBNAME / DBID e.t.c: https://www.ibm.com/support/knowledgecenter/en/SSEPEK_10.0.0/sqlref/src/tpc/db2z_sp_dsnaccox.html however wanted to confirm)

If DSNACCOX executes on all the statistics tables for all databases / tablespaces then typically how long does it take to complete? What are the factors that influence the execution time of DSNACCOX?

I would be grateful if the experts could share their experience on DSNACCOX completion times using which I can decide how to write a program to generate logs during specific phases of DSNACCOX

We have z/OS DB2 v10 (NFM). The size of all our databases is 100 GB (thought the info would be helpful)

Earnestly awaiting helpful pointers.

Thanks & Regards
SRICOBSAS
visionplus.trams@outlook.com
infra.app.supp.se@gmail.com
_________________
SriCobSAS

SYNCSORT :: RE: SORT trick needed

$
0
0
Author: bshkris
Posted: Sat May 06, 2017 1:25 am (GMT 5.5)

I have another block with SORT.
I need to append the message to my input record. The out file have 250 bytes length.
Now, I want add( I/p rec + message).

I have my SORT card as below.

SORT FIELDS=COPY
OUTREC FIELDS=(1,23,1Z,
C'- 2 OR MORE SCHD DRILL RECORDS FOR THE SAME CCT NO, CPY NO WERE',
C'RECEIVED WITH THE SAME DRILL DATE ONCE REC WAS ACCEPTED.')
END

But the above one is syntax issue.
Please throw some ideas how we can add the multiple line messages to a record using SORT.

Thanks.
_________________
hi, good luck, keep in touch

SYNCSORT :: RE: SORT trick needed

$
0
0
Author: Nic Clouston
Posted: Sat May 06, 2017 1:30 am (GMT 5.5)

For a new problem start a new thread. And use the code tags or we won't know where to start. And cut and paste your sysout - using the code tags.
This topic is being locked.
_________________
Regards
Nic

DB2 :: RE: DSNACCOX (can it be run on 1 db/ts, total completion time)

$
0
0
Author: Nic Clouston
Posted: Sat May 06, 2017 1:34 am (GMT 5.5)

Please read the rules about email ids and then delete those from your signature.
_________________
Regards
Nic


SYNCSORT :: Adding big TEXT lines to each record using SORT

$
0
0
Author: bshkris
Subject: Adding big TEXT lines to each record using SORT
Posted: Sat May 06, 2017 1:40 am (GMT 5.5)

I have another block with SORT.
I need to append the message to my input record. The out file have 250 bytes length.
Now, I want add( I/p rec + message).

I have my SORT card as below.

SORT FIELDS=COPY
OUTREC FIELDS=(1,23,1Z,
C'- 2 OR MORE SCHD DRILL RECORDS FOR THE SAME CCT NO, CPY NO WERE',
C'RECEIVED WITH THE SAME DRILL DATE ONCE REC WAS ACCEPTED.')
END


SPOOL msg:

WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER276B SYSDIAG= 64249, 5120048, 5120048, 15990575
WER164B 1,028K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED
WER164B 0 BYTES RESERVE REQUESTED, 1,000K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER267A SORT STATEMENT : STATEMENT NOT FOUND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

But the above one is syntax issue.
Please throw some ideas how we can add the multiple line messages to a record using SORT.

Read more: http://ibmmainframes.com/viewtopic.php?t=65909&highlight=#ixzz4gEl3Vww5
_________________
hi, good luck, keep in touch

SYNCSORT :: RE: Adding big TEXT lines to each record using SORT

SYNCSORT :: RE: Adding big TEXT lines to each record using SORT

$
0
0
Author: Robert Sample
Subject: Reply to: Adding big TEXT lines to each record using SORT
Posted: Sat May 06, 2017 3:00 am (GMT 5.5)

The first issue I see is that you posted in the DFSORT/ICETOOL forum and your messages are prefixed with WER, which means they come from SYNCSORT. There is a SYNCSORT forum you should have posted in.

The second issue I see is that you posted code without using the Code tag, so spacing is lost. We don't know if that comma at the end of your line is in column 68 or 72 -- and it could make a difference in this case.

The third issue I see is that you seem to be ignoring the error you are being given:
Code:
WER267A SORT STATEMENT : STATEMENT NOT FOUND
tells you pretty clearly what the problem is -- perhaps if you posted the full output we could identify more about the problem, but with what you've posted so far .... The issue does not appear to have anything to do with "Adding big TEXT lines to each record using SORT" so far.
_________________
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

SYNCSORT :: RE: Adding big TEXT lines to each record using SORT

$
0
0
Author: Arun Raj
Posted: Sat May 06, 2017 4:11 am (GMT 5.5)

Topic moved to where it belongs.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard

SYNCSORT :: RE: Adding big TEXT lines to each record using SORT

JCL & VSAM :: find RACF group for access to spooled output

$
0
0
Author: jzhardy
Subject: find RACF group for access to spooled output
Posted: Mon May 08, 2017 11:46 am (GMT 5.5)

hi,

I'm trying to view spooled output but getting message "... insufficient access authority from &RACLNDE.**". How can I find the RACF group corresponding to this resource/class so that I can request this group for my profile.

DB2 :: RE: DSNACCOX (can it be run on 1 db/ts, total completion time)

$
0
0
Author: SRICOBSAS
Subject: Reply to: DSNACCOX (can it be run on 1 db/ts, total completion time)
Posted: Mon May 08, 2017 12:53 pm (GMT 5.5)

Hi Nic,

I tried editing my post to remove the signatures but I am unable to do so. I am getting a message "you are allowed to edit a post only within first 10 minutes of creating it". Apologies for the inclusion of my signatures. I rarely visit mainframe forums. Didn't know of the rules..

Will be watchful next time
_________________
SriCobSAS


DB2 :: RE: DSNACCOX (can it be run on 1 db/ts, total completion time)

$
0
0
Author: Nic Clouston
Posted: Mon May 08, 2017 2:02 pm (GMT 5.5)

The rules are there under "Site Announcements" sub-heading "Forum rules..."
_________________
Regards
Nic

JCL & VSAM :: RE: find RACF group for access to spooled output

$
0
0
Author: Garry Carroll
Posted: Mon May 08, 2017 2:48 pm (GMT 5.5)

Your RACF administrator(s) should be able to tell you if you give them the full message.

Garry
_________________
Everyone's entitled to ONE fatal mistake.....

SYNCSORT :: Check if any Detail records and extract count from Trailer

$
0
0
Author: V S Amarendra Reddy
Subject: Check if any Detail records and extract count from Trailer
Posted: Mon May 08, 2017 8:54 pm (GMT 5.5)

Hi All,

The requirement is below.

Input:(LRECL=80,RECFM=FB)

Code:

01 HEADER
02 DETAIL
02 DETAIL
02 DETAIL
99 0000003


Expected Output:(LRECL=80,RECFM=FB)

Code:

RECORDS RECEIVED
MM/DD/YY COUNT RECEIVED 0000003


In words, the requirement is check if there are any 'D' records in the input. If any, then produce the output like shown above and put the count from the trailer record.

If there are no 'D' records, set return code to 4

Can this be done using syncsort?

I built this card, but it doesn't return 4 when there are no '02'. Also, I know why it doesn't, it is because of the INCLUDE. Here H1,H2 are the symbols I used to put the text

Code:

OPTION COPY,NULLOUT=RC4                           
INCLUDE COND=(1,2,ZD,EQ,02,OR,1,2,ZD,EQ,99)       
OUTFIL IFTHEN=(WHEN=(1,2,ZD,EQ,99),               
        BUILD=(H1,80:X,/,&DATE,X,H2,X,4,7,80:X)),
        OMIT=(1,2,ZD,EQ,02)                       


Please let me know if there are any ideas.

SYNCSORT :: RE: Check if any Detail records and extract count from Trailer

$
0
0
Author: RahulG31
Subject: Reply to: Check if any Detail records and extract count from Trailer
Posted: Mon May 08, 2017 9:13 pm (GMT 5.5)

Why are you even looking for a '02' record? If there is No '02' record then the trailer count must be 0000000 (Or there may not be a trailer at all). If trailer count is greater than 0 (Or if there is a trailer) then that means there must be a detail record. So, you can only look at trailer count to tell whether you have a detail record (and their count). Isn't it?

.

SYNCSORT :: RE: Check if any Detail records and extract count from Trailer

$
0
0
Author: V S Amarendra Reddy
Posted: Mon May 08, 2017 9:20 pm (GMT 5.5)

Thanks for the reply Rahul.

That is the ideal case, but we don't want to trust the input since it was manually prepared. So, we want to check what was 'actually' sent in the input.
_________________
Cheers,
Amar

-People asking for suggestions are no less than us. It is only about Knowledge Exchange, No matter how small it is, Everything in the world deserves respect...

Viewing all 9405 articles
Browse latest View live