Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we get lrecl & recfm of an open file in a PL/I progr

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
idlebrain_9999
Warnings : 1

New User


Joined: 18 Dec 2006
Posts: 4
Location: Zurich

PostPosted: Thu Jan 04, 2007 1:59 pm    Post subject: Can we get lrecl & recfm of an open file in a PL/I progr
Reply with quote

Hello,

Can I get the information of LRECL and RECFM of a file in a PL/I program?

Thanks, Satish
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jan 04, 2007 2:04 pm    Post subject: Re: Can we get lrecl & recfm of an open file in a PL/I p
Reply with quote

idlebrain_9999 wrote:
Can I get the information of LRECL and RECFM of a file in a PL/I program?
Is this a PL/I question? Is this a sort question? Is this a file structure question?
Please explain....
Back to top
View user's profile Send private message
idlebrain_9999
Warnings : 1

New User


Joined: 18 Dec 2006
Posts: 4
Location: Zurich

PostPosted: Thu Jan 04, 2007 7:45 pm    Post subject: Re: Can we get lrecl & recfm of an open file in a PL/I p
Reply with quote

it is a PL/I question... i found the answers for it in the IBM reference manual...

we can get the inforamtion of a file in a PL/I program using Built-in functions like FILEDDINT and FILEDDWORD

thanks.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jan 04, 2007 7:57 pm    Post subject:
Reply with quote

Great, thanks for letting us know your question is answered.... icon_lol.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Fri Jan 05, 2007 1:25 am    Post subject:
Reply with quote

William Thompson wrote:
Great, thanks for letting us know your question is answered.... icon_lol.gif


Indeed, wished there were more of those out there icon_wink.gif This one deserves a statue icon_lol.gif
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Jan 05, 2007 2:21 am    Post subject:
Reply with quote

Quote:
we can get the inforamtion of a file in a PL/I program using Built-in functions like FILEDDINT and FILEDDWORD

I will not bet on that. My experience.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Fri Jan 05, 2007 3:37 pm    Post subject:
Reply with quote

Hi !

With a little Assembler-Programm that could be called by any language
you could read the Job-File-Controlblock of Datasets to get the informations and transfer it back to the calling programm.

In the ass-pgm, you have to issue RDJFCB (READ-JOB-FILE-CONTROLBLOCK) command.

Also you could use it for modifications, like for modifying the DSN by an open-instruction or so.

USING IOJFCB,R5
RDJFCB KTONDCB ...dcb-name

PRINT ON,GEN
SPACE
KTONDCB DCB DDNAME=TSTKTON,DSORG=PS,MACRF=GL,EXLST=KTONLST
SPACE
DS 0F
KTONNAM DC CL44' ' ...BEREICH DATASET-NAME
KTONMEM DC CL08' ' ...BEREICH MEMBER-NAME
KTONVLS DC CL01' ' ...BEREICH ANZAHL-VOLUMES
KTONVOL DC CL30' ' ...BEREICH VOUME-NUMBERS
SPACE
DS 0F
KTONLST DC X'87' ...EXLST FUER RDJFCB
DC AL3(KTONFCB) ...ADRESS FUER RDJFCB
SPACE
DS 0F
KTONFCB DS 176C ...RETURN-BEREICH FUER RDJFCB
SPACE
PRINT ON,NOGEN

PRINT ON,GEN
SPACE
IOJFCB DSECT ...DSECT
IEFJFCBN LIST=YES
SPACE
PRINT ON,NOGEN


Regards, UmeySan
Back to top
View user's profile Send private message
idlebrain_9999
Warnings : 1

New User


Joined: 18 Dec 2006
Posts: 4
Location: Zurich

PostPosted: Fri Jan 05, 2007 9:25 pm    Post subject: Re: Can we get lrecl & recfm of an open file in a PL/I p
Reply with quote

Hi UmeySan,

my requirement is to replace the assebler program with a PL/I program.. and i have completed it using EPLI BIFs... anyways thanks for sharing the information..

regards, satish
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us