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

How to use control statement to sort in Reporting Facility?


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Thu Jul 08, 2010 11:58 am
Reply with quote

..........
DEF A 301-320 X
DEF B 321-323 X
DEF C 324-326 X
DEF D 327-335 X
..........

SELECT A='1234'
CONTROL A D

FORMAT
A
B
C
D
//
I hope the result could sort based A(Ascend) and D (Descend), but I got error "DRA1811E CONTROL SPECIFIED WITH WRITE ONLY OPTION", Can someone tell me the problem, thx!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 08, 2010 7:13 pm
Reply with quote

Hello,

Which "reporting facility"?
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Tue Jul 13, 2010 7:11 am
Reply with quote

It's CA's datacom tool
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 13, 2010 7:16 am
Reply with quote

Hello,

It is completely all right to use more keystrokes. . . icon_smile.gif

Datacam is an entire database management system (i've been a Datacom dba for over 25 years). Which "tool" are you asking about? There are several ways to write reports in the Datacom environment.

If this is a batch job, show the jcl. If this is done online, use copy/paste and use the Code tag to show what is on the 3270 screen.
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Tue Jul 13, 2010 1:24 pm
Reply with quote

The jcl is
Code:
//STEP1 EXEC PGM=DRREPORT,REGION=6M                                 
//     INCLUDE MEMBER=****                                         
//     DD DSN=*********,DISP=SHR                           
//SYSPRINT DD SYSOUT=*                                             
//SYSOUT DD SYSOUT=*                                               
//SYSUDUMP DD SYSOUT=*                                             
//SORTIN DD DSN=&&IN,DISP=(,DELETE),UNIT=SYSDA,SPACE=(CYL,(20,10)) 
//SORTOUT DD DSN=&&OUT,DISP=(,DELETE),UNIT=SYSDA,SPACE=(CYL,(20,10))
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,10)                             
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,10)                             
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,10)                             
//DRWORK DD UNIT=SYSDA,SPACE=(CYL,10)         
//DRWORK DD UNIT=SYSDA,SPACE=(CYL,10)                                             
//DRLIB DD DUMMY                                           
//DROUT DD DSN=***.***.***,DISP=OLD                   
//SYSIN DD *                                               
 NOTE /************************************************/   
 OPTION LIST ON WRITE ONLY                                 
 USER '************'                 
 NOTE /************************************************/   
 TABLE***: FILE DATACOM 'DRFILTBL' RECORD=450                 
 NOTE /************************************************/   
     DEFINE DBCOMMAND     001-005   X                       
     DEFINE DBKEYNAME     006-010   X                       
     DEFINE DBKEYVALUE    011-050   X                       
     DEFINE DBELEMENTLIST 191-201   X                       
 NOTE /************************************************/   
 NOTE /* DATA REPORTER FOR THE **** FILE IN DB 030           
 NOTE /************************************************/   
 DEF A                      301-320  X                                                                                       
 DEF B            321-323  X                                                                        
 DEF C            324-326  X                                                                             
 DEF D            327-335  X                                                                              
          SET DBCOMMAND      = 'GSETL'                         
          SET DBKEYNAME      = 'RXRK2'                         
          SET DBELEMENTLIST  = 'RXRRC'                         
                                                               
          GET ******                                           
          GOTO LABEL2                                         
                                                               
      READSQ: SET DBCOMMAND  = 'GETIT'                         
          GET *****                                           
      LABEL2: GOTO EOJ ***** = 'E'                           
                                                               
      NOTE /************************************************/ 
      NOTE /****          REPORT DEFINITION             ****/ 
      NOTE /************************************************/ 
      SELECT ALL           
                                     
      FORMAT               
      A
      B
      C
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jul 13, 2010 8:44 pm
Reply with quote

Hello,

Suggest you download:
Reporting Facility Guide B00681-2E
from CA Support. It is free (as well as all of the other Datacom documentation) if your organization is licensed to use the product. . .

To sort using the CONTROL statement code:
Code:
    CONTROL FLD1 FLD2
to sort on FLD1 and FLD2.
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Wed Jul 14, 2010 7:13 am
Reply with quote

I used the control statement, but I got the following error, do you know the cause?
"
ERROR************ 00143/002 DRA1811E CONTROL SPECIFIED WITH WRITE ONLY OPTI
"
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Wed Jul 14, 2010 7:14 am
Reply with quote

and the default order should be ascend, right? then if I need descend order, how to write it?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 14, 2010 7:59 am
Reply with quote

Hello,

To repeat:
Quote:
Suggest you download:
Reporting Facility Guide B00681-2E
from CA Support.


I'm not connected to my lan (where the doc resides) - i'll try to look again when i get back to my main connection. The good news is that the support download is there 24/7.
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Wed Jul 14, 2010 12:23 pm
Reply with quote

sorry, I cannot find the doc in CA site, can you give a link?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jul 14, 2010 4:05 pm
Reply with quote

seman18 wrote:
sorry, I cannot find the doc in CA site, can you give a link?
Well, you need to get registered with them, their documentation is not free to distribute, that's a copy-right material.

www.ca.com/in/default.aspx
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 14, 2010 8:07 pm
Reply with quote

Hello,

Start at support.ca.com. . .

If your organization is licensed for Datacom, all of the material may be downloaded for free.

Registering is really simple if you have an e-mail address that is the license holder. Otherwise, you may need to have someone from that organization verify that you are working with them. It has been a long time since i registered and the process may have changed over time.

It is worth having a support account, so spending a bit of time is time well spent. . .
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 15, 2010 1:57 am
Reply with quote

Hello,

Quote:
then if I need descend order, how to write it?


From the manual:
Quote:
;A Specifies that the field has an ascending sort sequence.
;D Specifies that the field has a descending sort sequence.
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Thu Jul 15, 2010 2:07 pm
Reply with quote

Dick,
I use following statement after select, how still get the error "CONTROL SPECIFIED WITH WRITE ONLY OPTION", do you know what' the problem; beside, It's really hard to find the support mail to ask for documentation in the website, can you provide one? really appreciate!
Code:
control Filed;A
[/code]
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 15, 2010 7:50 pm
Reply with quote

Hello,

Did you go to support.ca.com ? Did you register (click the register link near the top-right of the page).

Quote:
It's really hard to find the support mail to ask for documentation in the website
I have never used e-mail to get documentation from CA Support. . . It is simply downloaded. . .
Back to top
View user's profile Send private message
seman18

New User


Joined: 08 Feb 2009
Posts: 67
Location: hz

PostPosted: Mon Jul 19, 2010 7:32 am
Reply with quote

Hi, I have registered an ID and login the site, and in the documentation search page, I select "CA DataCom/DB" and "All release", however, result says "No result found", I don't know what should I do?
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: Mon Jul 19, 2010 7:35 am
Reply with quote

Browse the product list. What CA calls a product is typically not what others call it. It could be listed as Unicenter DataCom, for example (although what it actually is under I don't know) -- under the letter U, not the letter D.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 19, 2010 9:12 am
Reply with quote

Hello,

What i do is go to support.ca.com and click login - which comes to here:
support.ca.com/irj/portal

Click on documentation (on the left side).

Click the "select a product" dropdown and key datacom. As you type, the selection list is narrowed and when you see CA Datacom/DB click on this.

Then click on the "select a release" dropdown and click on your release. Click go

The Reporting Facility Guide is closer to the bottom of the manuals list than the top. . .
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top