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

3 diff transactions 3 accounts


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cmohanraj

New User


Joined: 04 Apr 2005
Posts: 15

PostPosted: Mon Apr 11, 2005 2:46 pm
Reply with quote

there are 3 customers of a bank.
A,B,C

I want to write the transactions done by each of them in separate files

Let the account numbers be 1,2,3

Now tell me the steps how u will logically work out this.

(like how u will proceed doing this let it be jcl,cobol )
Back to top
View user's profile Send private message
Vayunandanrao

New User


Joined: 22 Mar 2005
Posts: 9

PostPosted: Mon Apr 11, 2005 5:23 pm
Reply with quote

Hi ,

First accept the a/c number based on a/c number , move or go to perticular statement/paragraph . There u can do as ur wish.

I think this is correct , if any mistake plz let me back

Regards
-VayunandanRao-
Back to top
View user's profile Send private message
sribks2005

New User


Joined: 04 Apr 2005
Posts: 20
Location: Mysore

PostPosted: Mon Apr 11, 2005 7:49 pm
Reply with quote

hi,

we can use "SORT" utility in JCL for this purpose.
Below i have given JCL code snippet to illustrate on this.

This will create 3 files based on the first 2 numbers in the input file.

Records having first 2 digits "01" will be put in file 1[ SORTOF1]
Records having first 2 digits "02" will be put in file 2 [SORTOF2]
Records having first 2 digits "03" will be put in file 2 [SORTOF3]


===========================================
Add job card info here

//PS01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN="input file name here",DISP=SHR
//*
//SORTOF1 DD DSN=B052DNS.BKS4.RECORD1,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(TRK,(10,50),RLSE),
// DCB=(B0.DSCB,RECFM=FB,LRECL=80,BLKSIZE=0)
//SORTOF2 DD DSN=B052DNS.BKS4.RECORD2,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(TRK,(10,50),RLSE),
// DCB=(B0.DSCB,RECFM=FB,LRECL=80,BLKSIZE=0)
//SORTOF3 DD DSN=B052DNS.BKS4.RECORD3,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(TRK,(10,50),RLSE),
// DCB=(B0.DSCB,RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=1,INCLUDE=(1,2,ZD,EQ,01)
OUTFIL FILES=2,INCLUDE=(1,2,ZD,EQ,02)
OUTFIL FILES=3,INCLUDE=(1,2,ZD,EQ,03)
//*
==============================================
i hope this will help you.
please inform us , whether this is what you wanted.

Thank you
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Apr 11, 2005 10:22 pm
Reply with quote

Mohanraj,

Here's a DFSORT job to do what you want, assuming the account numbers are 5-byte ZD values in positions 11-15:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...  output file for '1' transactions
//OUT2 DD DSN=...  output file for '2' transactions
//OUT3 DD DSN=...  output file for '3' transactions
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=OUT1,INCLUDE=(11,5,ZD,EQ,+1)
  OUTFIL FNAMES=OUT2,INCLUDE=(11,5,ZD,EQ,+2)
  OUTFIL FNAMES=OUT3,INCLUDE=(11,5,ZD,EQ,+3)
/*
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Cobol transactions in SYSVIEW COBOL Programming 0
No new posts Sort on different fields, removing du... SYNCSORT 8
No new posts How syntax check at Bind time is diff... DB2 5
No new posts CICS SOCKET shared between two transa... CICS 3
No new posts Compare PD Values with same storage &... JCL & VSAM 5
Search our Forums:

Back to Top