MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File manager (IMS) in batch
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Tue Jun 13, 2017 1:24 am    Post subject: Reply with quote

Have tested again this morning. Here is the JCL
Code:

//FMIMSIN  DD *                                           
Ã…Ã…FILEM SET HEADERPG=YES,PAGESIZE=60                       
Ã…Ã…FILEM IXB REGNTYPE=BMP,                                 
Ã…Ã…FILEM     PSBTYPE=DYNAMIC,                               
Ã…Ã…FILEM     DBDDSN=xxxx.IMS.DBDLIB,                       
Ã…Ã…FILEM     DBDMEM=VNOPC00,                               
Ã…Ã…FILEM     CRITERIA=Y,                                   
Ã…Ã…FILEM     IMSID=IM1B,                                   
Ã…Ã…FILEM     IMSOBA=80,                                     
Ã…Ã…FILEM     IMSNBA=50,                                     
Ã…Ã…FILEM     KEYEXT=N                                       
/*                                                         
//REPORT   DD SYSOUT=*                                     
//UNLOAD   DD DSN=S1491B.VNOPC00.EXTRACT1,                 
//         DISP=(,CATLG,DELETE),                           
//         SPACE=(CYL,(5,1,0),RLSE),                       
//         DCB=(RECFM=VB,LRECL=00267,BLKSIZE=0)           
//CRITDD   DD DSN=xxxx.UT1PROJ.CRITERIA(S1491B2),DISP=SHR 

Note the usage of CRITERIA=Y and the CRITDD DD name.
Here is the report produced
Code:

Extract from                                             
  IMS subsystem:       xxxx                             
  Primary database:    VNOPC00                           
Extract to data set:   S1491B.VNOPC00.EXTRACT1           
Processing Options                                       
  PSB type:            Dynamic                           
  Region type:         BMP                               
  Use criteria:        Y                                 
  Use key values:      N                                 
Criteria set:          xxxx.UT1PROJ.CRITERIA(S1491B2)   
DBD                                                     
  Data set name 1:     xxxx.IMS.DBDLIB   

VNOPC00  VNOAC10   01     200   200         1          0 
                     VNOACD0   02      39    39         2          0
                     VNOACE0   03       4     4         0          0
                     VNOACF0   03       4     4         0          0
                     VNOACU0   04      10    10         0          0
                     VNOACG0   03      10    10         0          0
                     VNOACH0   03      22    22         0          0
                     VNOACI0   03      20    20         0          0
                     VNOACJ0   03      26    26         0          0
                     VNOACK0   03      24    24        22          0
                     VNOACL0   02     101   101         0          0
                     VNOACM0   03       4     4         0          0
                     VNOACN0   04       2     2         0          0
                     VNOACO0   05      64    64         0          0
                     VNOACY0   02      18    18         0          0
Subtotal    VNOPC00                                    25          0
                                                                   
Grand total                                            25          0


This indicates quite clearly (if I could have formatted with Courier New and the output file confirms it) that the criteria selected 2 segments from VNOACD0 and 22 from VNOACK0.

So.... my original JCL using CRITDD only seems perfectly valid.
_________________
Michael


Last edited by misi01 on Tue Jun 13, 2017 6:34 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Tue Jun 13, 2017 1:42 am    Post subject: Reply with quote

Just tried the CRITDSN/CRITMEM suggestion you posted to no avail. My Rexx code was as follows
Code:

Ã…Ã…FILEM     CRITERIA=Y,                         
Ã…Ã…FILEM     CRITDSN=xxxx.UT1PROJ.CRITERIA,     
Ã…Ã…FILEM     CRITMEM=S1491B2,                   
Ã…Ã…FILEM     IMSID=IM1B,                         
Ã…Ã…FILEM     IMSOBA=80,                         
Ã…Ã…FILEM     IMSNBA=50,                         
Ã…Ã…FILEM     KEYEXT=N,                           
Ã…Ã…FILEM     PROC=*                             
Ã…Ã…FILEM     PROC=*                         
filerc = VIEWIMS('TPLDD=TEMPLATE')         
                                           
filerc = GETIMS(NEXT)                       
                                           
do i = 1 to 10                             
  say fmsegnm'***'left(inrec,100)'***'     
  filerc = GETIMS(NEXT)                     
end                                         
/+                                         

and the results were
Code:

filerc = VIEWIMS('TPLDD=TEMPLATE') 
                                   
filerc = GETIMS(NEXT)               
                                   
do i = 1 to 10                     
  say fmsegnm'***'left(inrec,100)'**
  filerc = GETIMS(NEXT)             
end                                 
                                   
FMNBB060 REXX procedure statements p
IBM File Manager for z/OS IMS Compon
VNOAC10 ***01SKANDINAVISKA ENSKILDA
VNOAC20 ***5444101000008517         
VNOAC20 ***5444201000008517         
VNOAC20 ***5444901000008517         
VNOAC20 ***5463501000008517         
VNOAC20 ***5463701000008517         
VNOAC20 ***5609001000008517         
VNOAC20 ***5822601000065022         
VNOAC20 ***5822701000064573         
VNOAC20 ***5822801000065006         

which shows that the GETIMS is only fetching the first (root) segment in the database (as well as the ensuing segments).

Basically, I'm wondering whether combining Rexx code and Criteria works/is allowed in Batch
_________________
Michael


Last edited by misi01 on Tue Jun 13, 2017 6:34 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Jun 13, 2017 5:17 am    Post subject: Reply with quote

Instead of quoting your output use code tags to get a fixed pitch font.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Tue Jun 13, 2017 6:35 am    Post subject: Reply with quote

Thanks Nic - have changed the appends on this page
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Tue Jun 13, 2017 11:22 am    Post subject: Reply with quote

misi01 wrote:
Just tried the CRITDSN/CRITMEM suggestion you posted to no avail. My Rexx code was as follows
which shows that the GETIMS is only fetching the first (root) segment in the database (as well as the ensuing segments).

Basically, I'm wondering whether combining Rexx code and Criteria works/is allowed in Batch


Misi01,

What are the contents of your criteria dataset?

In the manual in "Chapter 4. Working with Templates and Views" and then in the section "Using views to filter data display" there is a detailed description about "Specifying field selection criteria" which in detail explains the "The effects of selecting and field selection criteria"
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Tue Jun 13, 2017 3:38 pm    Post subject: Reply with quote

I'll have a look tomorrow, but what I can say is that if we run FM as a batch job with CRITERIA=Y and no Rexx involved, the expected segments alone are selected
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
misi01
Advanced


Joined: 02 Dec 2002
Posts: 616
Topics: 171
Location: Stockholm, Sweden

PostPosted: Wed Jun 14, 2017 12:56 am    Post subject: Reply with quote

Here's an example without Rexx.

First the criteria (the value to the right of 1 Sel: is the selection criteria for DEPA-TYP-KOD)
Code:

1 Sel: Ä5 = 2 ! Ä5 = 3                       
Offset 0                                     
Cmd Seq SHE Ref  Field Name                   
                 ****  Top of data  ****     
              1  1 FILEMANAGER-DEFAULT-01     
              2   2 VNOACD0                   
              3    3 VNOCCD0                 
              4K    4 VNOKCD1                 
              5K     5 DEPA-TYP-KOD           

Now the JCL
Code:

//FMIMSIN  DD *                                         
Ã…Ã…FILEM SET HEADERPG=YES,PAGESIZE=60                     
Ã…Ã…FILEM IXB REGNTYPE=BMP,                               
Ã…Ã…FILEM     PSBTYPE=DYNAMIC,                             
Ã…Ã…FILEM     DBDDSN=xxxx.IMS.DBDLIB,                     
Ã…Ã…FILEM     DBDMEM=VNOPC00,                             
Ã…Ã…FILEM     CRITERIA=Y,                                 
Ã…Ã…FILEM     IMSID=IM1B,                                 
Ã…Ã…FILEM     IMSOBA=80,                                   
Ã…Ã…FILEM     IMSNBA=50,                                   
Ã…Ã…FILEM     KEYEXT=N                                     
/*                                                       
//REPORT   DD SYSOUT=*                                   
//UNLOAD   DD DSN=S1491B.VNOPC00.EXTRACT1,               
//         DISP=(,CATLG,DELETE),                         
//         SPACE=(CYL,(5,1,0),RLSE),                     
//         DCB=(RECFM=VB,LRECL=00267,BLKSIZE=0)         
//CRITDD   DD DSN=xxxx.UT1PROJ.CRITERIA(S1491B2),DISP=SHR

and finally, the results
Code:

VNOPC00 ..VNOAC10 ......01         
VNOPC00 ..VNOACD0 ......01002     
VNOPC00 ..VNOACK0 ......01002105010
VNOPC00 ..VNOACK0 ......01002106009
VNOPC00 ..VNOACK0 ......01002106011
VNOPC00 ..VNOACK0 ......01002107010
VNOPC00 ..VNOACK0 ......01002108011
VNOPC00 ..VNOACK0 ......01002110011
VNOPC00 ..VNOACK0 ......01002111011
VNOPC00 ..VNOACK0 ......01002120007
VNOPC00 ..VNOACK0 ......01002120009
VNOPC00 ..VNOACK0 ......01002120011
VNOPC00 ..VNOACK0 ......01002124010
VNOPC00 ..VNOACK0 ......01002125011
VNOPC00 ..VNOACK0 ......01002126011
VNOPC00 ..VNOACK0 ......01002177011
VNOPC00 ..VNOACD0 ......01003     
VNOPC00 ..VNOACK0 ......01003105010
VNOPC00 ..VNOACK0 ......01003106011
VNOPC00 ..VNOACK0 ......01003108011
VNOPC00 ..VNOACK0 ......01003110011
VNOPC00 ..VNOACK0 ......01003120007
VNOPC00 ..VNOACK0 ......01003124010
VNOPC00 ..VNOACK0 ......01003125011
VNOPC00 ..VNOACK0 ......01003177011

The data after VNOACK0 ...... contains the value from the root segment (01) followed by the DEPA-TYP-KOD (02 or 03), so to me, this is definitely working as expected.
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> IMS All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group