View previous topic :: View next topic
|
Author |
Message |
MARINA JOSEPH
New User
Joined: 11 Jun 2009 Posts: 61 Location: chennai
|
|
|
|
Hi,
I am trying to obtain the RECFM of a file.
Code: |
IF SYSDSN("'"FILEIN"'") = 'OK' THEN
DO
DSINFO = LISTDSI(FILEIN)
SAY 'REASON' SYSREASON
IF DSINFO == 0 THEN
DO
SAY 'RECFM' SYSRECFM
END
END |
It throws error code as 16, and the REASON code is 5 which mean file is not cataloged.
But the file does exist. Its Volume serial . . . is : TSO006.
Thanks. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Make sure that the input dataset is within quotes |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
if you used quotes for SYSDSN, you need them also in LISTDSI. Both functions use the same method to access datasets info.
O. |
|
Back to top |
|
|
MARINA JOSEPH
New User
Joined: 11 Jun 2009 Posts: 61 Location: chennai
|
|
|
|
Thanks for all you replies, it worked. |
|
Back to top |
|
|
MARINA JOSEPH
New User
Joined: 11 Jun 2009 Posts: 61 Location: chennai
|
|
|
|
Hi,
I have a record as below:-
10 ACT-POL-APPL-NAME PIC X(18)
Code: |
POS2 = POS('PIC',REC.I)
LN1 = WORD(STRING,POS2-2) |
Can I give statement like this to fetch the word ‘10’?
Currently I am not able to fetch the same by giving this statement.
Thanks. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
POS and WORD are two seperate functions whose results should not be mixed up.
POS gives a physical position of the search argument within the string to be searched, whilst word gives a relative word number within the string to be searched. |
|
Back to top |
|
|
|