Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
3 diff transactions 3 accounts

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
cmohanraj

New User


Joined: 04 Apr 2005
Posts: 15

PostPosted: Mon Apr 11, 2005 2:46 pm    Post subject: 3 diff transactions 3 accounts
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
References
PostPosted: Mon Apr 11, 2005 2:46 pm    Post subject: Re: 3 diff transactions 3 accounts Reply with quote

Vayunandanrao

New User


Joined: 22 Mar 2005
Posts: 9

PostPosted: Mon Apr 11, 2005 5:23 pm    Post subject: Re: 3 diff transactions 3 accounts
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    Post subject: 3 different transactions 3 files
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 Moderator


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

PostPosted: Mon Apr 11, 2005 10:22 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1