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
 
Reading/updating files containing Spanned Records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER
Author Message
pleasepost

New User


Joined: 27 Sep 2005
Posts: 1

PostPosted: Tue Sep 27, 2005 2:31 am    Post subject: Reading/updating files containing Spanned Records
Reply with quote

I am working with files whose individual (variable) records can span the 32K block. I cannot use the IBM utilities (except IEBGENER to copy) or COBOL to read the files, as they are limited to using QSAM access methods. I have been told that I need to code an assembler program to process these spanned-block files. Could I get some assistance as to what kind of open/get/put coding is needed to do this?

Thanks,
Patel
Back to top
View user's profile Send private message
References
PostPosted: Tue Sep 27, 2005 2:31 am    Post subject: Re: Reading/updating files containing Spanned Records Reply with quote

ARJUN

New User


Joined: 16 Nov 2004
Posts: 18
Location: Chennai

PostPosted: Thu Feb 16, 2006 4:50 pm    Post subject:
Reply with quote

Here is a sample code for reading data from a PS file and writing data to a PS file of REC Length 80


FILEASM1 CSECT
SAVE (14,12)
BALR R12,0
USING *,12
ST R13,SAVEAREA+4

OPEN (INFILE,(INPUT),OUTFILE,(OUTPUT))
LTR R15,R15
BNZ BADOPEN
LOOP DS 0H
GET INFILE,INREC
MVC BATA,DATA
PUT OUTFILE,OUTREC
B LOOP
FINAL DS 0H
CLOSE (INFILE,,OUTFILE)
B RETURN
RETURN L R13,SAVEAREA+4
RETURN (14,12),T,RC=0
YREGS
BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=11,DESC=7
B RETURN
BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=11,DESC=7
B RETURN
BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=11,DESC=7
B RETURN
INFILE DCB DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800,MACRF=GM, +
DDNAME=INDD,EODAD=FINAL
OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800,MACRF=PM, +
DDNAME=OUTDD
INREC DS 0CL80
DATA DS CL80
OUTREC DS 0CL80
BATA DS CL80
SAVEAREA DS 18F
END FILEASM1
Back to top
View user's profile Send private message
winchaat

New User


Joined: 23 Mar 2005
Posts: 14

PostPosted: Thu Feb 16, 2006 6:10 pm    Post subject: hi!!
Reply with quote

hi

The code you given is only suitable for normal PS files.
For VSAM datasets you need to use ACB macros instead of DCB and parameters also should change accordingly



----->RAG
Back to top
View user's profile Send private message
ARJUN

New User


Joined: 16 Nov 2004
Posts: 18
Location: Chennai

PostPosted: Thu Feb 16, 2006 6:25 pm    Post subject:
Reply with quote

yeah,

If it is VSAM you have to use ACB and RPL macros, here is the example..

INFILE ACB AM=VSAM,DDNAME=INDD,MACRF=IN,EXLST=EXITS
RPLNAME RPL ACB=INFILE,AM=VSAM,RECLEN=80,AREA=INREC,AREALEN=80

and you have to use RPL name in GET,PUT macros instead of DCB macro name
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER All times are GMT + 6 Hours
Page 1 of 1