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
 

 

how to import SAS file from server unix

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
imagines

New User


Joined: 10 Sep 2007
Posts: 7
Location: Italy

PostPosted: Thu Apr 03, 2008 8:47 pm    Post subject: how to import SAS file from server unix
Reply with quote

Hi this is the job that I used
The file FILE.SAS is created BUT don't work correctly in Sas icon_cry.gif

//DELE0001 EXEC PGM=IEFBR14,COND=(0,NE)
//DD1 DD DSN=FILE.SAS,DISP=(MOD,DELETE),
// SPACE=(TRK,2)
//*
//ALLO0002 EXEC PGM=IEFBR14,COND=(0,NE)
//DD1 DD DSN=FILE.SAS,DISP=(,CATLG,DELETE),
// DCB=(DSORG=PS,RECFM=FS,LRECL=6144,BLKSIZE=6144),
// SPACE=(CYL,(20,20),RLSE)
//*=================================================================
//*=================================================================
//SRSFTP1 EXEC PGM=FTP,REGION=3M,PARM='(EXIT '
//SYSPRINT DD SYSOUT=*
//SYSTCPD DD DSN=SYS1.TCPIP.PARMLIB(xxxxxxx),DISP=SHR
//SYSFTPD DD DSN=SYS1.TCPIP.PARMLIB(yyyyyyy),DISP=SHR
//SYSMDUMP DD SYSOUT=*
//FILEIN DD DISP=SHR,DSN=FILE.SAS
//OUTPUT DD SYSOUT=*
//INPUT DD *
xxxxxXFTP.xxx.xxxxxxxx.xxxNET.xx
user password
CD A0xxxxxxx
BIN
GET xxxx.SAS7BDAT '//DD:FILEIN' (REPLACE
QUIT
Back to top
View user's profile Send private message

Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Apr 03, 2008 8:57 pm    Post subject:
Reply with quote

Is 'FILE.SAS' empty file? what is the file content of 'FILE.SAS'?

Any reason as why you are using BIN
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Apr 03, 2008 9:00 pm    Post subject: Reply to: how to import SAS file from server unix
Reply with quote

When exchanging data between different platform very seldom a BINARY transfer yields the wanted results icon_sad.gif

there are issues with ascii/ebcdic big_endian/little_endian

the best thing is to create a text file , upload it to the mainframe translating from ASCII to EBCDIC and use that to rebuild the data

unless, but I am not a SAS expert, SAS provides tools for such tasks
Back to top
View user's profile Send private message
imagines

New User


Joined: 10 Sep 2007
Posts: 7
Location: Italy

PostPosted: Thu Apr 03, 2008 9:02 pm    Post subject:
Reply with quote

Devzee wrote:

Is 'FILE.SAS' empty file? what is the file content of 'FILE.SAS'?

Any reason as why you are using BIN


Devzee wrote:

what is the file content of 'FILE.SAS'?
BIN


PROBABLY THIs is the mistake i Tranfer file from Unix directly into FILE.SAS

Devzee wrote:

why you are using BIN

icon_rolleyes.gif
is correct ASCII ?
Back to top
View user's profile Send private message
imagines

New User


Joined: 10 Sep 2007
Posts: 7
Location: Italy

PostPosted: Thu Apr 03, 2008 9:16 pm    Post subject:
Reply with quote

File on server xxxx.SAS7BDAT is a sas table and is in BIN format
Back to top
View user's profile Send private message
imagines

New User


Joined: 10 Sep 2007
Posts: 7
Location: Italy

PostPosted: Thu Apr 03, 2008 9:21 pm    Post subject:
Reply with quote

This is a correct File
BROWSE Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
********************************* Top of Data **********************************


------------------------------------------------------------------------------
#SASLAAS........................USER001 .!.!.p'd8.0101M0........USER001 .!E.....
7ECEDCCE000000000000000100000000CCFFFFF445357978F4FFFFDF00000010CCFFFFF445C02C03
B2123112100000000003000000000000550672208A2A47D48B01014000030080550672208A599E95
------------------------------------------------------------------------------
REGSTRY ................................ITEMSTOR........
DCCEEDE444444444444444444444444400000000000000000000000000000000CECDEEDD00000000
95723980000000000000000000000000000000000000000000000000000000009354236900000000
------------------------------------------------------------------------------
.........n.H....................................................................
00000000295C00000000000000000000000000000000000000000000000000000000000000000000
00000000552800010003000000000000000000000000000000000000000000000000000000000000
------------------------------------------------------------------------------
.C..............................................................................
2C650000000000000000000000000000000000000000000000000000000000000000000000000000
C3590001000000000000000000000000000000000000000000000000000000000000000000000000

THIS IS mi FILE.SAS after transfer

BROWSE Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
********************************* Top of Data *********************************


------------------------------------------------------------------------------
............B.a-.....k...G.....................................................
000000000000CE86B11CB9000C38111122032003000000000000111122032003030220300100000
0000000000002A10341FD280971C8F01220221224000000000318F0122022122421220E00031000
------------------------------------------------------------------------------
..........................................O.......O........ ....... ...........
222222222222222222222222222244542222A1617AD4A1617AD4000002A4000002A400000200000
000000000000000000000000000041410000CC2B3061CC2B3061000000C0000000C004000000300
------------------------------------------------------------------------------
....................................\..=\..=\..=...................O..........O
00000000000000000000000000000000A161E507E507E5070000000000000000A8BD0000A1617AD
00000000000000000000000000000000CC2B02DE02DE02DE0000000000000000A0660000CC2B306
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Apr 03, 2008 9:34 pm    Post subject: Reply to: how to import SAS file from server unix
Reply with quote

Please use "HEX ON VERT" and use the code tags

sample

Code:

------------------------------------------------------------------------------
ABCDEFGHIJabcdefghij1234567890
CCCCCCCCCD8888888889FFFFFFFFFF0000000100020003
123456789112345678911234567890000C000C000C000C
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts FTP from Mainframe to Unix - with CRLF vasanthz All Other Mainframe Topics 6 Thu Mar 23, 2017 5:12 am
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm


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